home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 28
/
Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso
/
CED
/
cedmanual.guide
(
.txt
)
< prev
next >
Wrap
Amigaguide Document
|
1995-08-24
|
142KB
|
2,321 lines
@database CedManual.guide
link to DosARexx
@Node Main "CedManual.guide"
CygnusEd Online Manual
Welcome to the CygnusEd Professional online documentation.
CygnusEd Professional is a powerful and fast text editor, designed to be
easy to learn just by looking through the menus. However, even the best
designed program has some hidden or non-obvious features, and CygnusEd's
menus are large enough that it's easy to miss some important features.
This documentation is setup so that it can easily be used as an
introduction to CygnusEd, or as a reference. All of the buttons in the
block below contain important information about how CygnusEd works, what
the important features are, and what the philosophy behind these features
is. When learning CygnusEd it is recommended that you at least glance at
all of these sections, to see what CygnusEd has to offer, and then read in
detail those that interest you.
CygnusEd is published by Cygnus Software, and is offered to Amiga
Computing readers by special Arrangement with Amiga Computing.
@{" Metamac - the macro editor " Link "Metamac"}
@{" Ed - the CygnusEd invoker " Link "Ed"}
@{" RecoverCedFiles - recovering data after a crash " Link "RecoverCedFiles"}
@{" Views overview - multiple files, multiple views " Link "ViewsOverview"}
@{" Macro Definitions - automate repetitive tasks easily with macros " Link "MacroDefinitions"}
@{" Command line options - public screens, etc. " Link "CommandLine"}
@{" ARexx commands - expand CygnusEd through ARexx " Link "ARexx"}
The menu buttons are best used as a reference when you have a
question on how a specific menu item works. All of CygnusEd's menu
commands are documented here.
@{" Project menu " Link "Project"}
@{" Environment menu " Link "Environment"}
@{" Special menu " Link "Special"}
@{" Cut/Paste menu " Link "CutPaste"}
@{" Search/Replace menu " Link "SearchReplace"}
@{" Move menu " Link "Move"}
@EndNode
@Node Project "Project menu"
Project menu
The commands in this menu are, as you would expect, mostly to do
with files, projects, printing and other similar operations.
@{" About... " Link "About"}
@{" Clear " Link "Clear"}
@{" Open new - Keyboard shortcut Amiga-? " Link "OpenNew"}
@{" Open... - Keyboard shortcut Amiga-o " Link "Open"}
@{" Include file... - Keyboard shortcut Amiga-O " Link "IncludeFile"}
@{" Save clip as... - Keyboard shortcut Amiga-n " Link "SaveClipAs"}
@{" Save - Keyboard shortcut Amiga-w " Link "Save"}
@{" Save as... - Keyboard shortcut Amiga-W " Link "SaveAs"}
@{" Save all changes " Link "SaveAllChanges"}
@{" Change current directory... " Link "ChangeCurrentDir"}
@{" Spawn new CED Ctrl+Esc " Link "SpawnNewCed"}
@{" Activate next CED Ctrl+n " Link "ActivateNextCed"}
@{" Print clip... - Keyboard shortcut Amiga-p " Link "PrintClip"}
@{" Print file... - Keyboard shortcut Amiga-P " Link "PrintFile"}
@{" Quit - Keyboard shortcut Amiga-q " Link "Quit"}
@{" Save & quit - Keyboard shortcut Amiga-Q " Link "SaveAndQuit"}
@{" Quit & die " Link "QuitAndDie"}
@EndNode
@Node Environment "Environment menu"
Environment menu
The Environment menu is a uniquely CygnusEd three part menu that
contains all of the settings for how CygnusEd operates.
@{" Global Settings " Link "GlobalSettings"}
@{" File Settings " Link "FileSettings"}
@{" View Settings " Link "ViewSettings"}
@EndNode
@Node GlobalSettings "Global Settings"
Global Settings
The 'Global Settings' menu is the first part of the peculiar three
part 'Environment' menu. The 'Global Settings' menu contains all of those
settings which affect all of the files and views in CygnusEd. This
includes such things as screen resolution, macro definitions, fonts, etc.
These settings are stored in your ceddefaults file if you select 'Save
Environment', at the bottom of this menu. When you first run CygnusEd the
'ceddefaults' file is loaded in with global, file and view settings.
Whenever a new file is loaded in, new extension specific settings from the
'File Settings' menu will be loaded in if a ceddefaults file with the same
extension (for example, ceddefaults.c, or ceddefaults.txt) is found.
However the global defaults are only loaded once, or if you explicitly load
them. Therefore it is important that when you change any of the global
settings that you save those settings in the ceddefaults file (no
extension) using the 'Save Environment' command.
@{" Open on public screen... " Link "OpenOnPublic"}
@{" Set screen type and size... " Link "SetScreen"}
@{" Duplicate Workbench size " Link "DuplicateWB"}
@{" Macro definitions " Link "MacroDefinitions"}
@{" Begin short invocation macro - Keyboard shortcut Amiga-m " Link "BeginShortMacro"}
@{" Begin long invocation macro - Keyboard shortcut Amiga-M " Link "BeginLongMacro"}
@{" Define startup macro " Link "DefineStartupMacro"}
@{" Quote key " Link "QuoteKey"}
@{" Clear definitions " Link "ClearDefinitions"}
@{" Load definitions... - Keyboard shortcut Amiga-; " Link "LoadDefinitions"}
@{" Save definitions... - Keyboard shortcut Amiga-' " Link "SaveDefinitions"}
@{" Priority " Link "Priority"}
@{" Autosave " Link "AutoSave"}
@{" Set icon tool name... " Link "SetIconToolName"}
@{" Colours " Link "Colours"}
@{" File save method " Link "FileSaveMethod"}
@{" Icon creation? " Link "IconCreation"}
@{" Hot-Start enabled? " Link "HotStart"}
@{" Auto-expand views? - Keyboard shortcut Amiga-[ " Link "AutoExpand"}
@{" Keypad = movement? - Keyboard shortcut Amiga-8 " Link "KeypadMovement"}
@{" Select font " Link "SelectFont"}
@{" Rendering choices " Link "RenderingChoices"}
@{" Load environment " Link "LoadEnvironment"}
@{" Save environment... - Keyboard shortcut Amiga-E " Link "SaveEnvironment"}
@EndNode
@Node FileSettings "File Settings"
File Settings
The 'File Settings' menu contains settings that are kept separately
for each file loaded into CygnusEd. These settings are stored on disk in
separate ceddefault files with each default file having a different
extension. If you load a file with a '.c' extension then CygnusEd looks
for a file called 'ceddefaults.c', in the current directory and then in S:.
If it finds such a file then it automatically loads in all of your file and
view settings from that settings file and applies them to the current view.
This allows you to easily have different tab sizes and other settings for
text files versus C source files.
@{" Tab size " Link "TabSize"}
@{" Customize tabs... - Keyboard shortcut Amiga-t " Link "CustomizeTabs"}
@{" Set right border... - Keyboard shortcut Amiga-^ " Link "SetRightBorder"}
@{" Set scroll jump " Link "SetScrollJump"}
@{" Max scroll xx... " Link "MaxScroll"}
@{" Layout? - Keyboard shortcut Amiga-5 " Link "Layout"}
@{" Word wrap? - Keyboard shortcut Amiga-6 " Link "WordWrap"}
@{" Insert mode? - Keyboard shortcut Amiga-7 " Link "InsertNode"}
@{" Tabs = spaces? - Keyboard shortcut Amiga-0 " Link "TabsSpaces"}
@{" Editable file? " Link "EditableFile"}
@EndNode
@Node ViewSettings "View Settings"
View Settings
CygnusEd allows you to have multiple cooperating views on a single
file. All of these views are windows into the same data. Changes in one
view are reflected in the others. In fact, if several views are displaying
the same area of a particular file, you can see changes happening in all of
the views simultaneously. The settings in this menu are stored separately
for different views of a particular file. This is occasionally useful.
@{" Status line " Link "StatusLine"}
@{" White spaces " Link "WhiteSpaces"}
@{" Scroll bar " Link "ScrollBar"}
@{" Set scroll borders... " Link "SetScrollBorders"}
@{" Views overview " Link "ViewsOverview"}
@EndNode
@Node Special "Special menu"
Special menu
The Special menu is, as the name suggests, a grab bag of
miscellaneous functions that don't fit into any of the other neat
categories.
@{" View operations " Link "ViewOperations"}
@{" Previous view - Keyboard shortcut Amiga-, " Link "PreviousView"}
@{" Next view - Keyboard shortcut Amiga-. " Link "NextView"}
@{" Split view - Keyboard shortcut Amiga-d " Link "SplitView"}
@{" Expand view - Keyboard shortcut Amiga-] " Link "ExpandView"}
@{" Grow view " Link "GrowView"}
@{" Shrink view " Link "ShrinkView"}
@{" Format " Link "Format"}
@{" Post period spaces... " Link "PostPeriodSpaces"}
@{" DOS/ARexx interface " Link "DosARexx"}
@{" Send DOS/ARexx command... " Link "SendDosArexx"}
@{" Install DOS/ARexx command... " Link "InstallDosArexx"}
@{" Load DOS/ARexx commands... " Link "LoadDosARexx"}
@{" Save DOS/ARexx commands... " Link "SaveDosARexx"}
@{" Send DOS/ARexx output to... " Link "SendDosARexx"}
@{" Enter ASCII... - Keyboard shortcut Amiga-- " Link "EnterASCII"}
@{" Center cursor - Keyboard shortcut Amiga-= " Link "CenterCursor"}
@{" Center line - Keyboard shortcut Amiga-\ " Link "CenterLine"}
@{" Repeat key/menu... - Keyboard shortcut Amiga-\ " Link "RepeatKeyMenu"}
@{" " Link "
@{" Find matching bracket - Keyboard shortcut Amiga-h " Link "FindMatching"}
@{" Mark/Jump Location " Link "MarkJumpLocation"}
@EndNode
@Node CutPaste "Cut/Paste menu"
Cut/Paste menu
The Cut/Paste menu is primarily concerned with various ways of
cutting out part of file and, optionally, pasting it in somewhere else.
CygnusEd has the fairly unique feature of having many different cut and
paste buffers. The standard cut/copy/paste commands can use any of the
Amiga clipboards 255 different units, and the word and line specific cut
and paste commands each have their own clip buffers also.
@{" Mark - Keyboard shortcut Amiga-b " Link "Mark"}
@{" Mark columnar - Keyboard shortcut Amiga-B " Link "MarkColumnar"}
@{" Cut - Keyboard shortcut Amiga-x " Link "Cut"}
@{" Copy - Keyboard shortcut Amiga-c " Link "Copy"}
@{" Paste - Keyboard shortcut Amiga-v " Link "Paste"}
@{" Set clipboard unit... " Link "SetClipboardUnit"}
@{" Rot marked " Link "RotMarked"}
@{" Strip CR marked " Link "StripCRMarked"}
@{" Change case marked " Link "ChangeCaseMarked"}
@{" Delete word Ctrl+Del " Link "DeleteWord"}
@{" Undelete word Ctrl+Alt+Del " Link "UndeleteWord"}
@{" Bck Spc word Ctrl+BckSpc " Link "BackspaceWord"}
@{" UnBck Spc word Ctrl+Alt+BckSpc " Link "UnbackspaceWord"}
@{" Delete line - Keyboard shortcut Amiga-k " Link "DeleteLine"}
@{" Delete to EOL - Keyboard shortcut Amiga-y " Link "DeleteToEOL"}
@{" Undelete line - Keyboard shortcut Amiga-l " Link "UndeleteLine"}
@EndNode
@Node SearchReplace "Search/Replace menu"
Search/Replace menu
The Search/Replace menu primarily contains commands to invoke and
control CygnusEd's high-speed searching and replacing. In addition this
menu contains commands for changing the case of words and letters, and
controlling CygnusEd's undo ability.
@{" Repeat search backwards - Keyboard shortcut Amiga-a " Link "RepeatSearchBackwards"}
@{" Repeat search forwards - Keyboard shortcut Amiga-s " Link "RepeatSearchForwards"}
@{" Search for... - Keyboard shortcut Amiga-S " Link "SearchFor"}
@{" Repeat replace - Keyboard shortcut Amiga-r " Link "RepeatReplace"}
@{" Replace... - Keyboard shortcut Amiga-R " Link "Replace"}
@{" Clip to search buffer " Link "ClipToSearchBuffer"}
@{" Set ASCII zero alias for search... " Link "SetASCIIzeroAlias"}
@{" Change case letter - Keyboard shortcut Amiga-g " Link "ChangeCaseLetter"}
@{" Change case word - Keyboard shortcut Amiga-G " Link "ChangeCaseWord"}
@{" Upper case word " Link "UpperCaseWord"}
@{" Lower case word " Link "LowerCaseWord"}
@{" Undo " Link "Undo"}
@EndNode
@Node Move "Move menu"
Move menu
CygnusEd's move menu contains all of the cursor movement commands.
Most of the menu items, the bottom fifteen, are there purely as a place to
put the keyboard shortcuts for the cursor movement commands, as the
ultimate in online documentation. You can select these commands from the
menu with the mouse, but few people actually do.
@{" Jump to line... - Keyboard shortcut Amiga-j " Link "JumpToLine"}
@{" Jump to auto-mark - Keyboard shortcut Amiga-4 " Link "JumpToAutoMark"}
@{" Jump to byte... - Keyboard shortcut Amiga-J " Link "JumpToByte"}
@{" Cursor key movement " Link "CursorKeyMovement"}
@EndNode
@Node About "About..."
About...
The 'About' menu command brings up an informative requester telling
you what version of CygnusEd you are running.
@EndNode
@Node Clear "Clear"
Clear
The 'Clear' command clears out the current file, including it's
name. All views of the current file will be cleared. If you have made any
changes then you will be asked to confirm the clear before proceeding. You
can undo this operation, but the file name is permanently lost.
@EndNode
@Node OpenNew "Open new - Keyboard shortcut Amiga-?"
Open new - Keyboard shortcut Amiga-?
The 'Open New' command creates a new, empty file buffer. If the
current file has multiple views on it then the current view will be used
for the new file buffer. If the current file has just one view on it, then
a new view will be created for it.
@EndNode
@Node Open "Open... - Keyboard shortcut Amiga-o"
Open... - Keyboard shortcut Amiga-o
The 'Open' command is used to load a new file from disk into
CygnusEd. The file is always loaded into the current view - a new view is
not created for the new file. If the current file has multiple views on it
then the current view will be used for the new file. If the current file
has just one view on it, then the new file will replace the current one.
If the current file has been changed then you will be aksed to confirm the
overwrite. The standard ASL file requester is used to select the file, or
files, to open. If multiple files are chosen then additional views are
opened for the additional files.
@EndNode
@Node IncludeFile "Include file... - Keyboard shortcut Amiga-O"
Include file... - Keyboard shortcut Amiga-O
The 'Include file' command is used to insert a file into the
current file. Including a file in this way is similar to pasting from the
clipboard, except that you are pasting from a file instead of from a
clipboard. Note that the keyboard shortcut for this command is
Amiga-Shift-o, which is very similar to the open command's keyboard
shortcut of Amiga-o. This similarity reflects the fact that the two
commands are similar, in that they both load in files. The standard ASL
file requester is used to select the file to include.
@EndNode
@Node SaveClipAs "Save clip as... - Keyboard shortcut Amiga-n"
Save clip as... - Keyboard shortcut Amiga-n
The 'Save clip as' command saves the current contents of the
clipboard as a file on disk. This is very convenient if you want to save
part of a file as a new file on disk, or if you want to break a file into
two parts. Alternately you can use the 'Open new' command, paste into the
new buffer, and save the new buffer with the 'Save' or 'Save as' commands.
@EndNode
@Node Save "Save - Keyboard shortcut Amiga-w"
Save - Keyboard shortcut Amiga-w
The 'Save' command saves the current file under its current name.
If the current file is unnamed, then the standard ASL file requester
appears to allow you to select a file name. The save will occur even if no
changes have been made to the file.
@EndNode
@Node SaveAs "Save as... - Keyboard shortcut Amiga-W"
Save as... - Keyboard shortcut Amiga-W
The 'Save as' command brings up the ASL file requester to allow you
to save the current file under a new name. The save will occur even if no
changes have been made to the file.
@EndNode
@Node SaveAllChanges "Save all changes"
Save all changes
The 'Save all changes' command will save all loaded files that have
been changed. Changed files are indicated with an asterisk ('*') in the
title bar. The number of changes made since the last save can also be
displayed (see the 'Status Line' command in the 'View Settings' menu).
@EndNode
@Node ChangeCurrentDir "Change current directory..."
Change current directory...
If you make use of CygnusEd's ability to execute DOS commands and
ARexx scripts from within CygnusEd then you sometimes need the ability to
change CygnusEd's directory, because these commands inherit CygnusEd's
current directory. The standard ASL directory requester is used to select
a new current directory.
@EndNode
@Node SpawnNewCed "Spawn new CED Ctrl+Esc"
Spawn new CED Ctrl+Esc
Although CygnusEd can edit multiple files, and have multiple views
on each of those files, it sometimes makes sense to make use of the
multitasking abilities of the Amiga by running multiple copies of CygnusEd.
This can give you extra flexilibity in the arranging of your document
windows, even allowing you to have different copies of CygnusEd running on
different screens. Additional copies can be run from the CLI, from the
workbench, or by selecting 'Spawn new CED'.
@EndNode
@Node ActivateNextCed "Activate next CED Ctrl+n"
Activate next CED Ctrl+n
If you run multiple copies of CygnusEd you will frequently need to
switch between them. This command makes it easy to do this.
@EndNode
@Node PrintClip "Print clip... - Keyboard shortcut Amiga-p"
Print clip... - Keyboard shortcut Amiga-p
The 'Print clip' command starts up a background process to print
the contents of the clipboard to your printer. Because the printing runs
in the background you can resume work immediately. However, you cannot
exit CygnusEd until printing has completed.
@EndNode
@Node PrintFile "Print file... - Keyboard shortcut Amiga-P"
Print file... - Keyboard shortcut Amiga-P
The 'Print file' command starts up a background process to print
the contents of the current file to your printer. Because the printing
runs in the background you can resume work immediately, even editing the
document that is being printed, without affecting the results. However,
you cannot exit CygnusEd until printing has been completed.
@EndNode
@Node Quit "Quit - Keyboard shortcut Amiga-q"
Quit - Keyboard shortcut Amiga-q
The 'Quit' command does not necessarily tell CygnusEd to completely
quit. It would be more accurate to describe it as a 'Close view' command.
The current view on the current file is closed. If that is the last view
on that file then the file is cleared from memory (after confirmation from
the user if there were any changes to the file). If there is only one view
open when this command is chosen then then CygnusEd's main window closes
also. However, even then CygnusEd may not completely terminate. If you
are using the 'Hot Start' feature of CygnusEd, then CygnusEd remains
dormant, ready to be invoked by the hot key (Alt-Shift-Return) or the
CygnusEd invoker program, ed.
@EndNode
@Node SaveAndQuit "Save & quit - Keyboard shortcut Amiga-Q"
Save & quit - Keyboard shortcut Amiga-Q
The 'Save & quit' command is just like the 'Quit' command except
that the current file is first saved. Again, this command is best thought
of as 'Save & close view' rather than 'Save & quit'.
@EndNode
@Node QuitAndDie "Quit & die"
Quit & die
If you are using the 'Hot Start' feature of CygnusEd then closing
down the last view does not actually terminate the program - unless you use
the 'Quite & die' command. This removes CygnusEd from memory after closing
the last view.
@EndNode
@Node OpenOnPublic "Open on public screen..."
Open on public screen...
One of the wonderful new features of the AmigaDos 2.0 operating
system is public screens. Many programs, such as Mand2000, Art Department
Professional, Directory Opus and many others open what are known as 'public
screens'. If one of these programs is running when you select this menu
item then a requester will appear listing all the currently available
public screens that are at least 640 by 200 pixels in size. You can select
any of these screens, and suddenly CygnusEd is running on Mand2000's
screen, so that you can write letters while you explore fractals! The
workbench screen is the one public screen that is always available, so that
this command is how you get CygnusEd to open on the workbench screen. If
there is only one public screen available, typically the workbench screen,
then no requester appears and CygnusEd moves directly to that screen. If
you have multiple copies of CygnusEd running and if CygnusEd is setup to
declare its own screen to be public then you can open a second copy of
CygnusEd on another CygnusEd's screen.
@EndNode
@Node SetScreen "Set screen type and size..."
Set screen type and size...
This command invokes the standard ASL screen mode requester. This
requester allows you to select any standard Amiga screen mode, including
the new AGA screen modes. It also allows you to pick a wide variety of
screen modes that become available if you install one of many third party
graphics boards that supply intuition compatible screen modes. Such boards
include the Picasso, Retina, EGS Spectrum and many others. CygnusEd is
highly compatible with all of these graphics boards.
@EndNode
@Node DuplicateWB "Duplicate Workbench size"
Duplicate Workbench size
The 'Duplicate Workbench size' command is provided based on the
assumption that as monitors and graphics boards change, people frequently
need to change the screen modes that they work with, and that it's a
nuisance to have to change the screen modes for potentially dozens of
different programs. This problem can be particularly annoying if the
program you are trying to change comes up in a no longer visible screen
mode, forcing you to reconfigure it blind. If you set CygnusEd to
'Duplicate Workbench size' then CygnusEd will always open up in exactly the
same screen mode and resolution as you workbench screen, meaning that you
will never have to reconfigure it again. CygnusEd will open up on a
different screen from the workbench, but this screen will be identical.
@EndNode
@Node MacroDefinitions "Macro definitions"
Macro definitions
CygnusEd features a very powerful macro definition ability that
makes it possible to assign any sequence of commands to any key on the
keyboard, with no programming required. Creating macros in CygnusEd and
remapping the keyboard is so easy that CygnusEd users frequently create
'throwaway' macros for key sequences that they will only be repeating a
couple of times. The basic way of defining macros in CygnusEd is to type
Amiga-m, the key you want to assign the macro to, do the actions you want
recorded (all the commands are processed while you do this) and then stop
defining by typing Amiga-m again. That's it.
@{" Begin short invocation macro - Keyboard shortcut Amiga-m " Link "BeginShortMacro"}
@{" Begin long invocation macro - Keyboard shortcut Amiga-M " Link "BeginLongMacro"}
@{" Define startup macro " Link "DefineStartupMacro"}
@{" Quote key " Link "QuoteKey"}
@{" Clear definitions " Link "ClearDefinitions"}
@{" Load definitions... - Keyboard shortcut Amiga-; " Link "LoadDefinitions"}
@{" Save definitions... - Keyboard shortcut Amiga-' " Link "SaveDefinitions"}
@EndNode
@Node BeginShortMacro "Begin short invocation macro - Keyboard shortcut Amiga-m"
Begin short invocation macro - Keyboard shortcut Amiga-m
This is the most commonly used command for defining macros. Select
this command (or, more commonly, type Amiga-m) and then follow the prompts.
The first thing you will be prompted for is a key to assign the macro to.
This can be a single key, such as F1, 'B', or 'Enter', or it can be a
modified key, such as Ctrl-U, Alt-Shift-8, or Ctrl-Alt-Shift-Amiga-Tab.
Every key on the keyboard, with the exception of the control, alt, shift
and Amiga keys, can have a macro assigned to it. Because the Amiga key is
a valid qualifier key, you can override the supplied command key shortcuts.
Because control, alt and shift are also valid qualifier keys, you can have
as many as sixteen commands attached to one key. In order to end the
definition of a macro, select this command again. In other words, this
command is simultaneously stop and start definition.
Macros can contain any keystroke, including Amiga-key menu
shortcuts, indeed they can contain any menu command at all. If a menu
command in a macro brings up a requester, such as the search requester,
then CygnusEd will query you as to whether you would like the contents of
the requester stored in the macro. If you answer yes then the search
string and flags will be inserted at playback time, and the requester will
not be displayed - the same string will be searched for each time. If you
answer no then the requester will come up each time you playback the macro.
If you want your macro to search for whatever string is in the search
buffer at the time the macro is invoked, then you would need to use a
search command that doesn't bring up a requester at all - such as 'Repeat
search forwards'. The same principles apply to the 'Open' and 'Save as'
requesters, the 'Send DOS/ARexx command'' and other requesters.
If in the course of defining a new macro you invoke a previously
defined macro then the contents of the previously defined macro are played
back into the new macro. The new macro receives a copy of the previous
macros contents. If at a later date you change the original macro, the new
macro with its copy is unaffected.
The only menu commands that can not be included inside a CygnusEd
macro are the macro menu commands.
To delete an existing macro, either use metamac, or assign an empty
macro to that key. That is, select 'Begin short invocation macro', then
enter the keystroke, then select 'Begin short invocation macro' again.
The commands in the macro menu cannot be added to macros.
In practice we suggest using the function keys and control-key
sequences for creating commands.
Some of my favourite macros are listed here, along with the
keyboard shortcuts I use for them:
I attach the following macro to Ctrl-Return. It has the convenient
(for C programmers) effect of creating a new brace block and leaving the
cursor on an indented line.
shift-Return (auto-indent)
shift-Return (auto-indent)
up arrow
shift-Return (auto-indent)
I attach the following macro to Ctrl-S. It has the useful affect
(for dyslexics) of swapping the next two characters.
Delete
right-arrow
Alt-Delete (undelete last deleted character)
left-arrow
If you wish to edit macros that you have created, see the separate
utility program 'MetaMac'.
@EndNode
@Node BeginLongMacro "Begin long invocation macro - Keyboard shortcut Amiga-M"
Begin long invocation macro - Keyboard shortcut Amiga-M
To increase potential compatibility with other text-editors such as
Micro-Emacs, that have rather long and convoluted multi-character keyboard
commands, CygnusEd allows you to assign macros to key sequences. The
keyboard shortcut for this command is Amiga-shift-m, as opposed to Amiga-m,
to reflect the similarity with the 'Begin short invocation macro' command.
With this command, after you type the first character to use in invoking
the command, you will be prompted as to whether you want to use additional
keystrokes to invoke this command. You can define as long an invocation
sequence as you want, but realistically, anything more than two characters
is unmanageable. You could, for instance, assign the 'Paste' command to
the rather non-standard sequence ctrl-P,ctrl-A,ctrl-S,ctrl-T,ctrl-e. Some
might even argue that this is an intuitive and wonderful way to set up your
text editor. Others, more sensible, might argue that the punishment for
mistyping a single character is too annoying.
In order to end the definition of a macro, select this command
again. In other words, this command is simultaneously stop and start
definition.
As with the single character invocation macros, long invocation
macros can be edited with the separate utility program 'MetaMac'.
@EndNode
@Node DefineStartupMacro "Define startup macro"
Define startup macro
If you like to have your text editor always great you by typing in
a cheery 'Hello jack', or if, like the majority of us who aren't named
Jack, you'd rather have your text editor invoke a particular ARexx script
on startup, the startup macro is perfect for you. Simply select this
command and then enter the sequence of commands you wish played back at
startup. To end the macro definition, select 'Begin short invocation
macro'.
@EndNode
@Node QuoteKey "Quote key"
Quote key
You may end up assigning a macro to a key, such as Ctrl-S, which
you occasionally need to type into a document. If you need to do this,
select the 'Quote key' command followed by the key in question. The 'Quote
key' command tells CygnusEd to ignore any macros assigned to the keystroke
which follows.
@EndNode
@Node ClearDefinitions "Clear definitions"
Clear definitions
The 'Clear definitions' command clears all currently loaded macro
definitions.
@EndNode
@Node LoadDefinitions "Load definitions... - Keyboard shortcut Amiga-;"
Load definitions... - Keyboard shortcut Amiga-;
The 'Load definitions' command loads a CygnusEd macro file in,
first clearing out all existing macro definitions.
@EndNode
@Node SaveDefinitions "Save definitions... - Keyboard shortcut Amiga-'"
Save definitions... - Keyboard shortcut Amiga-'
The 'Save definitions' command saves the currently loaded CygnusEd
macro definitions. The macros can be saved to any filename, but if you
save them to s:cedmacros (the default name) then they will be automatically
loaded in when you run CygnusEd the next time. If you save them to
cedmacros in some directory other than s: then they will only be loaded in
if the cedmacros file is in you current directory when you run CygnusEd.
@EndNode
@Node Priority "Priority"
Priority
Inherit?
Priority x?
Set priority...
In order to cooperate well in the Amiga's multitasking environment
it is important that CygnusEd have its multitasking priority set to the
appropriate level, so that it doesn't steal more CPU time than is
necessary, but it doesn't run sluggishly. There are two modes which
CygnusEd can operate in for deciding it's priority. One is to inherit it's
priority from its parent. Its parent would either be the workbench, if you
run it from there, or a CLI, if you run it from there. The priority of a
CLI can be changed with the ChangeTaskPri command. If the priority of a
CLI is changed after CygnusEd is run, that has no effect on CygnusEd's
priority.
The other more common way is to set CygnusEd to a specific
priority. The default is one. This is usually a good choice because if
you are compiling or ray tracking at a priority of zero or lower, CygnusEd
will run at top speed, unaffected by your ray tracing. This is probably
what you want, since speed and responsiveness are terribly important in a
text editor, but not even possible in a ray tracer. If CygnusEd is sitting
idle, when you aren't using it, CygnusEd will use zero CPU time, so there
is rarely a reason to lower CygnusEd's priority. The one operation that
should have a higher priority than CygnusEd is any telecommunication
programs you may run, as downloads may experience errors if CygnusEd steals
too many CPU cycles from them.
The 'Inherit' and 'Priority n?' check boxes (where 'n' represents
the currently selected fixed priority) decide whether CygnusEd inherits its
priority or sets it absolutely. The 'Set priority...' command lets you set
the fixed priority, but it has no affect if 'Inherit?' is set.
@EndNode
@Node AutoSave "Autosave"
Autosave
xx min?
Set timer...
The autosave command is an extremely handy feature for making sure
that you don't lose work in case of an unexpected crash. Although CygnusEd
is an extremely stable and torture tested program, other programs,
especially ones in development, may unexpectedly take down your Amiga.
Although autosave can't completely protect you, it can minimize the damage.
If you enable autosave (select the 'n min?' command to make a check
box appear) then all changed files will be saved to temporary files every n
minutes (you set the interval with 'Set timer...'). If you are editing
'letter.txt' then an autosave copy will be saved to 'letter.txt.auts'. If
you later manage to successfully save your changes, or if you close the
file without saving, then the autosave file will be automatically deleted.
However if your system crashes unexpectedly, then the autosave files will
be left behind. The next time you go to edit 'letter.txt.auts', CygnusEd
will tell you that there is an autosave version, and will give you the
option to load it in instead of the older version. It will then load the
autosave version in under the proper file name, without '.auts'. So even
if you don't realize that you've lost changes, CygnusEd will remind you.
If you do realize that you've lost some changes, you can also look for them
by searching for '#?.auts' files.
If you are editing a new file that you have not yet saved (an
unnamed file) then CygnusEd will autosave the file as
'CygnusEdUnNamedN.auts', where the 'N' represents a number, necessary to
ensure that the filename is unique. Because the file was never saved by
you, CygnusEd can't warn you of the unsaved version the next time you load
the real version. Therefore after a crash, if you think you may have been
working on new files it is important that you look for any #?.auts files.
@EndNode
@Node SetIconToolName "Set icon tool name..."
Set icon tool name...
When files are saved from CygnusEd they can, optionally, be saved
with an icon, for easy access from the workbench. The 'Set icon tool name'
allows you to specify what the default tool should be for the icons. The
'default tool' is the program that will be run when you double click on the
icon. The default 'default tool' is 'ed', the CygnusEd invoker. An
alternate, more flexible way of controlling the icon used for files saved
from CygnusEd is to create the icon you want used, complete with imagery,
tool types and save it to 'env:ced/def_cedfile.info'. You'll have to
create the 'env:ced' directory, and you'll probably want to save the icon
to 'envarc:ced/def_cedfile.info' as well, to make your preferred icon a
permanent setting.
@EndNode
@Node Colours "Colours"
Colours
Cycle colours - Keyboard shortcut Amiga-$
Adjust colours...
Use WBench colours
CygnusEd allows limited control over the colours it uses, and then
only when it is using its own screen (ie; CygnusEd will not allow you to
change the colours of the workbench screen or some other screen that
CygnusEd is 'visiting'). The cycle-colours command, a rarely used command
that is granted a keyboard shortcut for anachronistic reasons, merely
shuffles the four available colours through all of the twenty-four
mathematical permutations and possibilities. 'Adjust colours' brings up a
colour selection requester, which allows you to customize the colours any
way that you want. 'Use WBench colours' tells CygnusEd to grab the colours
from the workbench screen. It also tells CygnusEd to grab the workbench
colours every time CygnusEd is run, meaning that any changes in workbench
colours will soon be reflected in CygnusEd's colour scheme.
@EndNode
@Node FileSaveMethod "File save method"
File save method
CygnusEd offers you a number of different ways of saving your
files, depending on how strongly you value safety versus speed. The
simplest method is 'Simple saves'. With this method the file is simply
saved out directly. This is slightly faster than the other methods, it
avoids ever having multiple copies of file on disk (handy if you are
running very low on space) and, because it doesn't create a brand new file,
it can avoid some permission problems when saving to a file server. The
main problem with 'Simple saves' is that if your Amiga crashes while
CygnusEd is in the process of writing out the file, not only are the new
changes lost, it's quite likely that the old file is lost as well, leaving
you with a zero length file. If this does happen to you, stop your Amiga's
reboot with a well placed Ctrl-D and look at the disaster recovery section
of this manual.
Next up on the safety scale is 'Safe saves'. With this method the
file is saved to a temporary filename, and when all of the data has been
safely written to disk, the old file is deleted and the new one is renamed
into its place. With this method, if your Amiga crashes, it is quite
likely that either the old file, the new file, or both, will survive
unscathed. The old file will typically be found unaltered, and the new
file may be found listed under a name such as 'CygnusEdTemp.0Na', where 'N'
represents some number.
Finally, the safest method, my favourite, my recommended choice, is
'Backup to *.bak'. This method is very similar to safe saves, and has all
of its benefits. However instead of deleting the old file, the old file is
rename to '*.bak'. If you are editing 'file.txt' then the old version will
get renamed to 'file.txt.bak' (deleting any older versions of file.txt.bak
if necessary). Not only does this make the saving process easier, but it
allows you to revert to a previous version, long after you finish saving.
@EndNode
@Node IconCreation "Icon creation?"
Icon creation?
The 'Icon creation?' toggle governs whether CygnusEd saves an icon
with each file it saves. See 'Set icon tool name' for more information.
@EndNode
@Node HotStart "Hot-Start enabled?"
Hot-Start enabled?
In order to sate the power hungry desires of impatient programmers,
CygnusEd has an optional mode, used by almost all CygnusEd users, called
'Hot-Start'. If you enable this mode it means that when you exit CygnusEd
it doesn't really exit. It sits waiting for your next command, invisible
to the untrained eye. To awaken CygnusEd you can simply type
'Alt-Shift-Return' - easily drummed out with the right hand, and CygnusEd
instantly pops into view. If you are at the command line then you can type
'ed' or 'ed filename' or 'ed *.c' and CygnusEd will pop up into view and
load the requested files. For more information, see 'Quit & Die' and 'Ed:
the CygnusEd invoker'
@EndNode
@Node AutoExpand "Auto-expand views? - Keyboard shortcut Amiga-["
Auto-expand views? - Keyboard shortcut Amiga-[
CygnusEd can have many different files open and many different
views on these files, Some people, like myself, like most of these views to
be open so that I can see the contents of many files simultaneously.
Others feel that only the currently active file is of interest, and they
want all others to shrink away to nothing. 'Auto-expand views?' turns on a
mode in which whenever a new view becomes active, either through being
selected with the mouse or through the next/previous view commands, that
view is expanded to maximum size, while the surrounding views are shrunk
down to the minimum one line height.
@EndNode
@Node KeypadMovement "Keypad = movement? - Keyboard shortcut Amiga-8"
Keypad = movement? - Keyboard shortcut Amiga-8
For those who work on IBM compatible computers all day, and yearn
for the thrill of a numeric keypad that doesn't type numbers, this command
is for you. Enabling this command turns the numeric keypad into a
directional pad, with 2, 4, 6, and 8 being arrow keys, 1 and 7 being end of
line and beginning of line (end and home), 3 and 9 being bottom of screen
and top of screen (page down and page up), 0 toggling insert mode, and '.'
being the same as delete.
@EndNode
@Node SelectFont "Select font"
Select font
Select disk font...
Topaz 80 column
Topaz 60 column
CygnusEd was never intended to be a word processor, so don't expect
fancy font capabilities. CygnusEd does not allow multiple fonts in one
file, it simply allows you to select alternate fonts for all of your files,
to allow you to choose the appropriate font for your particular graphics
card, monitor, and visual acuteness. You can either select Topaz 80 or
Topaz 60, or use the standard ASL font requester to choose any mono-spaced
font from disk.
@EndNode
@Node RenderingChoices "Rendering choices"
Rendering choices
Use custom scrolling routines?
Use system scrolling routines?
Make screen public?
CygnusEd's lightning fast screen update and scrolling have always
been two of the features that have ensured its success. However being the
fastest on the block doesn't help if everybody is moving to a graphics
board that you're not compatible with. Therefore CygnusEd 3.5 offers a
number of options to allow you to choose the balance between system
compatibility and speed that is right for you.
The fastest routines are chosen by selecting 'Use custom scrolling
routines'. With this choice CygnusEd writes characters directly to display
memory (when on its own screen) and programs the blitter directly, for
scrolling and redraws that happen faster than the eye can see.
Direct blitter programming can cause CygnusEd to sop up every
single bus cycle available and, for reasons never quite explained, can
cause some terminal programs to experience data errors while downloading
files. All sorts of explanations as to why this can't happen have been
given, but it continues happening. So, the simple solution is to select
'Use system scrolling routines?'. In this mode the scrolling is slightly
slower (but still very fast) and the characters are written directly to the
screen at a minimum speed of 30,000 characters per second.
The most system compatible mode, compatible with most third party
graphics boards, is to make CygnusEd's screen public. In this mode
CygnusEd strictly follows the rules and allows other programs to share its
screen. This allows you to, for instance, open Mand2000 on CygnusEd's
screen, and do some four colour fractal exploration while writing the great
Canadian novel. Or you open Art Department Professional on your CygnusEd
screen so that you can watch your ARexx scripts process images while you
write e-mail.
@EndNode
@Node LoadEnvironment "Load environment"
Load environment
Default - Keyboard shortcut Amiga-e
Specify...
All of the settings above can be saved to CygnusEd's environment
files. Typically those settings are automatically loaded in, but if you
wish you can force those settings to be reloaded. 'Default' loads in the
default settings file, based on the current file extension. If the current
file is called 'fred.txt' then the file 'ceddefaults.txt' will be looked
for, in the current directory and then in 'S:'. If that file isn't found,
then 'ceddefaults' (no extension) will be looked for, also in the current
directory and then in 'S:'. All settings, global, file and view will be
loaded.
'Specify' lets you select any settings file and load it in.
@EndNode
@Node SaveEnvironment "Save environment... - Keyboard shortcut Amiga-E"
Save environment... - Keyboard shortcut Amiga-E
This command allows you to save all of the current environment
settings. All of the global, file and view settings are saved. The
default file name supplied is 'S:ceddefaults.ext' where '.ext' is the
extension of the current file you're editing. If you have made changes to
the global settings, you should probably save the environment to
'S:ceddefaults' as well as the global defaults are by default loaded from
there initially, and are never loaded again, unless specifically requested
by the user.
@EndNode
@Node TabSize "Tab size"
Tab size
CygnusEd supports true tabs, of any size ranging from 1 to ten
spaces long. Typical sizes are five or eight for writing letters, two,
three or four for writing programs. Files that are displayed with a tab
size other than the one they were created with can lose their formatting
and look quite terrible.
Interesting animations can be made by swiftly changing the tab size
of an excessively indented C file. Try holding down the shift key and drag
selecting all ten tab sizes, then watch as CygnusEd changes tab sizes ten
times. Or make a macro with even more tab size changes.
@EndNode
@Node CustomizeTabs "Customize tabs... - Keyboard shortcut Amiga-t"
Customize tabs... - Keyboard shortcut Amiga-t
Some people, particularly assembly language programmers, aren't
satisfied with evenly spaced tabs. They want a tab for opcodes, another
for operands, and a third, way out there, for comments. Selecting
'Customize tabs' lets you specify any arbitrary arrangement of tab stops
that you would like.
@EndNode
@Node SetRightBorder "Set right border... - Keyboard shortcut Amiga-^"
Set right border... - Keyboard shortcut Amiga-^
The 'Set right border' command allows you specify a right border
for your documents. This right border affects word wrap, paragraph
reformatting, and centering of lines.
@EndNode
@Node SetScrollJump "Set scroll jump"
Set scroll jump
CygnusEd can scroll your files faster than the eye can follow, but
sometimes an unreadable blur of text isn't actually what you want. 'Set
scroll jump' controls how quickly text scrolls. Larger numbers mean faster
scrolling.
@EndNode
@Node MaxScroll "Max scroll xx..."
Max scroll xx...
One of the important design goals of CygnusEd was to ensure that,
whenever possible, cursor moves from one part of a file to another were
done by scrolling, rather than jumping to the new location and redrawing.
The advantage of scrolling is that it means that you intuitively keep track
of how far you've gone and where you are. If the screen redraws, you lose
all visual clues as to where you are. It can be hard to differentiate
between a move of several thousand lines and a move to the next line in the
file.
'Max scroll' lets you control this. It sets the maximum distance
that CygnusEd will scroll. If you ask CygnusEd to move the cursor any
further than this maximum number of lines, either by using the 'Jump to
line' command, the search command, or even the page down command, then
CygnusEd will redraw the screen rather than scrolling. I strongly feel
that 'Max scroll' should be set to at least several lines more than the
number of lines visible on the screen, and to at least thirty or so.
However, some misguided people think that speed is more important than
knowledge, so they like to set it down to ten, or less. These small
maximum scroll jumps can speed things up, but the price you pay is an
increased difficulty in following your travels through the file.
@EndNode
@Node Layout "Layout? - Keyboard shortcut Amiga-5"
Layout? - Keyboard shortcut Amiga-5
Normally CygnusEd does not allow the cursor to go beyond the end of
lines. The cursor is normally only allowed to go where there are
characters. Sometimes, particularly when using the vertical block command,
or creating tables, it can be useful to allow the cursor to go out beyond
the end of lines. Layout mode does this. Turn this on if you want the
cursor to move beyond the end of lines.
If you are out beyond the end of a line and you type a character,
CygnusEd will automatically fill in the necessary spaces to allow the
character to be typed at that location. If you then delete that character,
CygnusEd will then remove those spaces. Additionally, CygnusEd will remove
any end of line spaces and tabs as you scroll around the file, if you are
in layout mode.
@EndNode
@Node WordWrap "Word wrap? - Keyboard shortcut Amiga-6"
Word wrap? - Keyboard shortcut Amiga-6
Although CygnusEd is certainly not a word processor, it is
frequently used for writing of letters and other non-programming documents,
especially for e-mail. It has the advantage over word processors of being
extremely quick, keeping up with even the swiftest typist. To support
those who write paragraphs as well as functions, CygnusEd has a 'Word wrap'
function. If you enable this mode then whenever the cursor reaches the
right border (see 'Set right border') the current word and the cursor are
wrapped around onto the next line.
However, because CygnusEd does not store text as paragraphs (it
stores text as individual lines which is the standard ASCII file way to
store files) and because CygnusEd does not store any hidden formatting
codes, that's about all the the word wrap can do. If you delete words from
the middle of a paragraph, the paragraph will not be reformatted. If you
add words in the middle of a paragraph, no reformatting will happen until
you reach the end of the line, at which point the entire end of the line
will be wrapped.
If you edit a paragraph and destroy the formatting, CygnusEd can
still help you out with its paragraph formatting command. See 'Format' for
more information.
@EndNode
@Node InsertNode "Insert mode? - Keyboard shortcut Amiga-7"
Insert mode? - Keyboard shortcut Amiga-7
When entering new characters CygnusEd normally pushes all previous
characters out of the way. If you put CygnusEd into 'Insert mode' then
each new character typed replaces the one previously under the cursor.
Insert mode does not effect deleting.
@EndNode
@Node TabsSpaces "Tabs = spaces? - Keyboard shortcut Amiga-0"
Tabs = spaces? - Keyboard shortcut Amiga-0
When you press the Tab key, CygnusEd normally enters a real tab
character (ascii value nine). This is the most space efficient way of
storing tabs, and it allows you to then delete the tab with a single press
of the delete or backspace key. However if you move your document to
another text editor that does not support the tab size that you have
chosen, your document's formatting will change. Therefore CygnusEd gives
you the option to have all new tabs entered as spaces. If you enable 'Tabs
= spaces?' then pressing the Tab key enters the number of spaces required
to move the cursor to the next tab stop.
@EndNode
@Node EditableFile "Editable file?"
Editable file?
The 'Editable file?' command allows you to tell CygnusEd that a
particular file should not be changed. Any attempts to do so will cause an
error message. The editable file flag will also get set if you load in a
file that you do not have write permission for. If this happens you can
enable editing in the file by selecting 'Editable file?', but you may not
be able to write your changes out to the file because of insufficient
permissions.
@EndNode
@Node StatusLine "Status line"
Status line
CygnusEd's status line is broken up into two parts. The left hand
part normally displays as much of the path name of the loaded file as
possible, but can be made to display other information through the controls
below. The left half also normally displays a view number at the left edge
if there is more than one view on a particular file.
The right half of the status line always displays the same
information, in the following format:
KLWIT * line 1000 col 234
These symbols mean:
'K' - if this is present, CygnusEd is in Keypad=Movement mode, and
the numeric keypad is setup for cursor movement instead of typing numbers.
Type Amiga-8 to toggle this.
'L' - if this is present, that file is in Layout mode and the cursor
can go beyond the end of lines. Type Amiga-5 to toggle this.
'W' - if this is present, that file is in Word wrap mode, and words
will wrap around when typed beyond the right border. Type Amiga-6 to
toggle this.
'I' - if this is present, that file is in Insert mode, and characters
typed will push other characters out of the way. Type Amiga-7 to toggle
this.
'T' - if this is present, that file is in tabs=spaces mode and any
tabs that you enter will be replaced with the appropriate number of spaces.
Type Amiga-0 to toggle this.
'*' - if this is present it means that the file has been changed,
that the change count (see below) is non-zero.
The remainder of the right half of the status line displays the
current line number and column number for the current view.
The 'Status line' sub menu allows control over what information is
displayed in the left half of a particular view's status line. The
'On/Off?' command turns the entire status line on or off. If the status
line is off then the files name is showed instead.
If 'changes' is selected then the number of changes made to the
current file since it was last saved are shown. Each character that you
type into CygnusEd counts as a change. Each character that you delete
counts as a change. Pasting 50,000 characters into a document counts as
one change. Replacing all one thousand occurences of 'the' with the
identical text 'the' counts as one thousand changes. So, the number of
changes can give you an idea as to how much has been done to your file
since you last saved it, but it does not give you an accurate measurement
of how different your file is from the saved version. Note that the number
of changes can be negative, if you saved the file and then undid some of
the changes - undoing a change reduces the change count by the number that
it originally went up by. If you type 'R' and then type 'Backspace' the
change count will be two. If you type 'R' and then select 'Undo' then the
change count will be zero. In both cases the file will be unchanged.
If 'pages' is selected then the number of pages in the document
will be displayed. The number of pages is obtained simply by dividing the
number of lines by 66, a common printer page length.
If 'Show ASCII values' is enabled then the status line displays the
numerical ASCII value of the character under the cursor. This can be very
useful when editing binary files (yes, CygnusEd gives you a limited ability
to edit binary files). The ascii value replaces the KLWIT display.
@EndNode
@Node WhiteSpaces "White spaces"
White spaces
If you are very concerned about precisely what is in your files,
tabs and spaces can give you some problems, because they look identical.
Ordinarily the only way that you can differentiate between them is to try
deleting them. The commands in the 'White spaces' menu allow you to make
tabs, spaces and end of line (EOL) characters visible. This can make your
screen incredibly cluttered, but if you want to make sure that tabs or
spaces are used consistently in your files, these options are very useful.
The 'Esc codes visible?' toggle is a peculiar beast which
demonstrates CygnusEd's small time word processing replacement aspirations.
You can enter printer or console escape codes directly into your documents
to alter the appearance of text when printed. However entering these codes
destroys the formatting of the document in CygnusEd so badly that it's very
hard to get the desired appearance. If you disable 'Esc codes visible?'
then all recognized escape codes are hidden - the only sign of their
existence is that the following character is printed in inverse. This
feature is a bit anachronistic, and I don't recommend that you use it.
@EndNode
@Node ScrollBar "Scroll bar"
Scroll bar
Scroll bars, especially proportional scroll bars, can be incredibly
useful gadgets, both for giving you smooth analog control over your
location in a file, but also for giving you instant intuitive feedback
about the size of your file and your location in it. However, some people
feel that scroll bars waste too many columns of valuable screen real
estate. And some people running earlier versions of AmigaDOS occasionally
run into a bug whereby they can't move their mouse to the right edge of the
screen. Therefore CygnusEd allows you to decide whether or not you want
scroll bars, and which side you want them. You can even have each view
having scroll bars on a different size. I'm not sure why you'd want to
though...
@EndNode
@Node SetScrollBorders "Set scroll borders..."
Set scroll borders...
The 'Set scroll borders' command is a very important one for giving
CygnusEd its distinctive smooth scrolling and its uncanny ability to always
ensure that you have enough context. Far too many text editors happily let
you move your cursor right to the bottom of the window, seemingly never
realizing that if your cursor is at line 199, you're probably also
interested in what's on line 200. The scroll borders define a box inside
the window which CygnusEd tries to keep the cursor inside of. Whenever the
cursor goes outside of this box, by getting too close to any of the edges,
CygnusEd smooth scrolls the necessary number of lines of text onto the
screen. The only time CygnusEd will allow the cursor outside of the scroll
borders is if there is no additional data to scroll on - ie; if the cursor
is at either end of the file, or the left edge, or the extreme right edge
of the longest visible line.
@EndNode
@Node ViewOperations "View operations"
View operations
Although the Amiga's wonderful multitasking abilities mean that
there is technically no need for a program to handle multiple files
simultaneously (after all, you can always just run another copy of the
program) it turns out that is frequently very useful to have many files
loaded into a simple program at one time. It simplifies window management,
cutting and pasting, and keeping everything together on one screen.
CygnusEd allows you to load multiple files, and it also allows you to have
multiple views on one file. So, for instance, you can easily be looking at
the opening paragraph of your doctoral thesis in one view while looking at
a supporting paragraph on page 97 in another view. Because the two views
are actually looking at the same document, changes made to one view are
also made to the other one - you never need to worry about them getting out
of sync.
To create a new view select the 'Split view' command. This takes
the current view and splits into two roughly equal sized views. If
necessary it will shove other adjacent views out of the way. At this point
you have created two cooperating views on the same file. A common use for
this would be that when you are writing code that calls a function, you may
want to look at the functions definition earlier on in the file, or you may
want to look at some variable declarations earlier on in the same function,
but currently off screen. If you scroll back to look at these other areas
then you have to return to your original location before you can use the
information - by which time you may have forgotten. Even using marked
locations to make the jumping back and forth easy won't allow you to
examine both areas simultaneously. CygnusEd's multiple views and simple
window management commands solve this problem. Simply type 'Amiga-d' to
split the current view in half. Your cursor will be in the bottom view,
and both views will be displaying roughly the same area of the same file.
Jump, search and scroll to the area of interest and cut or paste the
relevant code. Now type 'Amiga-,' (Amiga-comma) to jump to the previous
view - the original one. Type or paste in your code, while still looking
at the sample code in the view below. When your finished, type 'Amiga-.'
(Amiga-period) to move to the next view (the recently created one) and then
type 'Amiga-q' to close that view down and resume your work. It's simple,
fast and powerful. You never have to take your hands off the keyboard.
New views can be created on a whim and destroyed seconds later, having
served their purpose.
If you want to look at a different file, perhaps an include file, a
slight variation on the above process applies. After doing the split view,
use the 'Amiga-o' shortcut to open up a new file. This new file will be
placed into the newly created view. From that point on the instructions
are identical. In this case 'Amiga-q' not only closes the new view, it
also removes the new file from memory.
Of course you don't have to close the new view seconds after you
created it. You can have up to twenty different views on a range of
different files open all the time, and you can cut and paste between them,
use the next/previous view commands to move among them, or use the mouse to
select a new view or size them, or size them from the keyboard with macros
attached to the 'Grow view' and 'Shrink view' commands.
Now, onto the individual function descriptions.
@EndNode
@Node PreviousView "Previous view - Keyboard shortcut Amiga-,"
Previous view - Keyboard shortcut Amiga-,
This command moves the cursor to the previous view, the one above
the current one. If the top view is active, the bottom one will be
selected. If only one view is open this command has no effect.
@EndNode
@Node NextView "Next view - Keyboard shortcut Amiga-."
Next view - Keyboard shortcut Amiga-.
This command moves the cursor to the next view, the one below the
current one. If the bottom view is active, the top one will be selected.
If only one view is open this command has no effect.
@EndNode
@Node SplitView "Split view - Keyboard shortcut Amiga-d"
Split view - Keyboard shortcut Amiga-d
The 'Split view' command takes the current view and splits it into
two roughly equal sized views on the same file. If the current view is
less than three lines high then the surrounding views will be pushed out of
the way to make room. If there is no room to expand the other views, or if
the number of views has already reached twenty then this command will fail.
@EndNode
@Node ExpandView "Expand view - Keyboard shortcut Amiga-]"
Expand view - Keyboard shortcut Amiga-]
This command expands the current view out to the maximum possible
size.
@EndNode
@Node GrowView "Grow view"
Grow view
This command moves the title bar of the current view up one line.
If there is no room to move the title bar up, the title bar of the view
below is moved down one line. This command is rather useless as a menu
command with no keyboard shortcut, so I always use a macro to bind this
command to a key. My usual choice is F8.
@EndNode
@Node ShrinkView "Shrink view"
Shrink view
This command moves the title bar of the current view down one line.
If there is no room to move the title bar down, the title bar of the view
below is moved up one line. This command is rather useless as a menu
command with no keyboard shortcut, so I always use a macro to bind this
command to a key. My usual choice is F9.
@EndNode
@Node Format "Format"
Format
The format commands continue CygnusEd's imitation of a simple word
processor. Selecting one of these two commands tells CygnusEd to treat all
the text from the current line down to the first blank line or line
starting with a space or a tab, as a single paragraph. It then reformats
this paragraph to fit neatly within the right border (see 'Set right
border'). The left border is always assumed to be the first column. If
you use the 'With fill' option then spaces are added as necessary to fill
exactly to the right border. If you select 'Without fill' then no extra
spaces are added. Normally one space is added after each word, with
additional spaces added after punctuation such as periods, exclamation
marks, etc. See 'Post period spaces'.
@EndNode
@Node PostPeriodSpaces "Post period spaces..."
Post period spaces...
This command, added exclusively for my demanding European
customers, controls how many spaces should be placed after punctuation such
as periods and exclamation marks when formatting paragraphs. The default
is two.
@EndNode
@Node SendDosArexx "Send DOS/ARexx command..."
Send DOS/ARexx command...
This command allows you execute any DOS or ARexx command from
within CygnusEd. Simply type the name of the command, and any parameters
which it takes and the command will be run. The output will by default be
sent to a standard console window which will only open up if the program or
script being run produces some output. The real power of this program
shows up when you embed it within a macro. If you say yes when the macro
creation process asks if you would like the contents of the requester
stored in the macro then when you play back the macro it will automatically
execute the desired script or command. This allows you to attach an
unlimited number of ARexx commands to arbitrary keys on your keyboard.
@EndNode
@Node InstallDosArexx "Install DOS/ARexx command..."
Install DOS/ARexx command...
CygnusEd allows you to make a limited number of ARexx commands
(ten) show up in the ARexx menu. The 'Install DOS/ARexx command...'
command lets you select these. Select the number, from one to ten, of the
slot that you would like to use. Then enter the command that you would
like executed. After installing a new command you should probably use the
'Save DOS/ARexx commands' command to save your new configuration. The
command is not actually run at this point. It can be run either by
pressing the appropriate function key, or by selecting the command from the
menus. Don't forget to save your ARexx command definitions afterwards.
@EndNode
@Node LoadDosARexx "Load DOS/ARexx commands..."
Load DOS/ARexx commands...
This command loads a set of ten DOS and ARexx command names from a
file (default name s:RexxCommands) and places them in the user configurable
ARexx commands menu.
@EndNode
@Node SaveDosARexx "Save DOS/ARexx commands..."
Save DOS/ARexx commands...
This command saves the current set of ten DOS and ARexx command
names into a file (default name S:RexxCommands). If you use the default
name then the command names will be automatically loaded in again when you
next run CygnusEd.
@EndNode
@Node SendDosARexx "Send DOS/ARexx output to..."
Send DOS/ARexx output to...
Executing Dos and ARexx commands frequently produces output. If you
don't ever want to see this, use this command to set the output file name
to 'nil:', or if you have a version of AmigaDOS where the method doesn't
work, use the public domain 'null:' device, which has the same effect.
Alternately, you can send the output to a file on disk, or to a
console window. The default output file is:
"con:0/0/640/90/Ced<->Dos\Rexx/Inactive/Auto/Close/Wait"
Roughly translated this means a console window, opening up in the
upper left hand corner of the workbench screen (0,0), 640 by 90 pixels in
size, with a title bar saying 'Ced<->Dos\Rexx'. The console window will
open inactive, it won't open until the commands actually print something,
it will have a close gadget and it will allow you close it even though
CygnusEd still has it open.
CygnusEd opens the output file, whatever it may be, once only
(unless you change it). That means, in the case of the default console
file, that if you execute a number of commands, each producing output, all
of their output will remain for you to view at your leisure, and it will
all be in one console window. The downside is that it means that the
window doesn't automatically go away when the commands finish executing.
However, since it doesn't come up active, and since you can make it as
small as desired, or use the 'null:' device, that shouldn't really matter.
Finally, if you want, you can use the standard 'publicscreen' keyword to
cause the output console window to open up on any public screen, including
CygnusEd's. This can allow you, for instance, to look at the results of a
testrun of your program on the same screen as your source code. Other
conole windows, including regular CLI shells can also be made to appear on
CygnusEd's screen, allowing you to do directory listings and other DOS
commands from within CygnusEd.
@EndNode
@Node EnterASCII "Enter ASCII... - Keyboard shortcut Amiga--"
Enter ASCII... - Keyboard shortcut Amiga--
The 'Enter ASCII...' command is used to enter a character into the
current file by typing in its ascii value. For instance, the ASCII value
of the space character is 32, the ASCII value of the number one is 49. The
ASCII values range from zero to 255, and can be entered in decimal,
hexadecimal (base 16 - precede the numbers with either a dollar sign '$' or
'0x'), or even base 2 (precede the numbers with a percent sign '%'). The
Enter Ascii requester keeps on returning until you select 'Cancel' or hit
return when it is empty. This allows you to easily enter sequences of
ASCII values. Any character can be entered into CygnusEd.
@EndNode
@Node CenterCursor "Center cursor - Keyboard shortcut Amiga-="
Center cursor - Keyboard shortcut Amiga-=
The 'Center cursor' command attempts to place the cursor, and the
line of text that it is on, in the center of the current window. It
scrolls the current file up or down in order to do this. The only thing
that will stop CygnusEd from vertically centering the cursor is if the
cursor is too close to the either end of the current file, in which case
the scrolling will stop when the top or bottom of the file meets the top or
bottom of the window. The cursor is not horizontally centered. The text
is not altered.
@EndNode
@Node CenterLine "Center line - Keyboard shortcut Amiga-\"
Center line - Keyboard shortcut Amiga-\
The 'Center line' command takes the current line of text, strips
all white space (space characters and tabs) from each end, and then centers
the result in the area between column zero and the user defined right edge.
The centering is done by padding the beginning of the file with spaces. If
the line is too long to fit then it is not changed at all.
@EndNode
@Node RepeatKeyMenu "Repeat key/menu... - Keyboard shortcut Amiga-\"
Repeat key/menu... - Keyboard shortcut Amiga-\
The 'Repeat key/menu' command is a powerful command for mechanizing
repetitive work. When you select this command q requester appears asking
for the desired repeat count. After you enter it, CygnusEd waits for you
to type any key or select any menu item, at which point it repeats it the
desired number of times. If you need to type in exactly eighty '*'
characters, or if you need to move the character down exactly 93 lines,
this command is perfect. If you need to do one of these operations
frequently you can define a macro which contains a repeat command - the
repeated keystrokes will be recorded in the macro just as if you typed them
yourself. Additionally, if you have a macro which you would like repeated
dozens of times, this command will do that. And don't forget that you can
repeat any keystroke and any menu - there doesn't even have to be a
keyboard shortcut for the menu, just select it with the mouse if you want.
@EndNode
@Node FindMatching "Find matching bracket - Keyboard shortcut Amiga-h"
Find matching bracket - Keyboard shortcut Amiga-h
The 'Find matching bracket' command is extremely useful for
programmers. If you place the cursor over any of the parenthetical
characters ('(', ')', '[', ']', '{' or '}') then CygnusEd will search for
its mate. In doing so CygnusEd will respect any other parenthetical pairs
inside of the same type. For instance, if your cursor is on the first line
of this text '((Testing)EndTest)' then find matching bracket will move the
cursor to the end of the text. In this example, '(]TestingEndTest)', the
cursor will also move from the beginning of the text to the end, because
']' doesn't pair up with '('. Using the 'Find matching bracket' command
twice in a row will always return you to your starting location.
@EndNode
@Node MarkJumpLocation "Mark/Jump Location"
Mark/Jump Location
Mark location 1, 2, 3 - Keyboard shortcuts - Amiga-!, @, #
Jump to mark 1, 2, 3 - Keyboard shortcut Amiga-1, 2, 3
The 'Mark location' commands record the cursors current position in
the file so that you can easily return to a particular place in a file.
The shortcuts were chosen so that, for instance, Amiga-shift-2 will mark a
spot and Amiga-2 will jump to that spot. If you mark a particular line and
then add additional lines before that, the mark location will automatically
be updated so that the same line of text will be jumped to.
@EndNode
@Node Mark "Mark - Keyboard shortcut Amiga-b"
Mark - Keyboard shortcut Amiga-b
The 'Mark' command is used for starting to mark a block for cutting
or copying. The cursor location when this command is selected is used as
one end of the block and the cursors position is used as the other end of
the block. Therefore, immediately after selecting this command, the area
selected contains no characters. Moving the cursor forwards or backwards
adds one character to the selected area. When you move the cursor forwards
through the file, the character under the cursor when you selected 'Mark'
is included in the block, if you move backwards through the file it is not.
Note that unlike most text editors and word processors, when
CygnusEd highlights a block, it only highlights out as far as there is
actually text. This makes the block marking very useful for tracking down
over length lines or problems with extra or missing text.
The contents of the clipboard are not affected unless you select
'Cut' or 'Copy'.
Marking a block can be cancelled by selecting 'Mark' again.
@EndNode
@Node MarkColumnar "Mark columnar - Keyboard shortcut Amiga-B"
Mark columnar - Keyboard shortcut Amiga-B
The 'Mark columnar' command is similar to the 'Mark' command except
that the marked out area is always a rectangle. This is very useful for
removing columns from tables, adjusting indenting, creating script files
and much more. If you paste in a columnar block then all of the lines of
the block are pasted in at the same column number in adjacent lines of the
file, padding the lines with spaces if necessary. The other important
difference when pasting a vertical block is that the cursor position is
adjusted differently. Pasting a normal block leaves the cursor one column
to the right of the last character inserted. Pasting a columnar, or
vertical block, leaves the cursor one row below the first character of the
last line inserted. This is very handy if you want to insert the same
columnar block multiple times because you can just keep on pasting and the
blocks all stack downwards. The most common use for this is to do a
columnar cut on a tab character and then hold down Amiga-V to repetitively
paste this tab character in, thus indenting a section of text or code.
Doing this with a regular block would require extra cursor movements after
each paste, or a macro.
Marking a columnar block can be cancelled by selecting 'Mark
columnar' again. Selecting 'Mark' after 'Mark columnar' merely changes the
type of block being marked from a columnar block to a normal block, and
vice versa.
Columnar blocks frequently enclose areas with lines of varying
lengths. In this situation it is sometimes necessary, when cutting or when
pasting, to move the cursor beyond the end of the current line to allow
cutting out text on a longer line earlier on. For this reason, columnar
blocks are frequently used in 'Layout mode' (see layout mode)
@EndNode
@Node Cut "Cut - Keyboard shortcut Amiga-x"
Cut - Keyboard shortcut Amiga-x
The 'Cut' command cuts the currently marked area to the Amiga
clipboard. If CygnusEd is not in mark or mark columnar modef, the warning
'No area selected' appears. If no characters are selected, either because
the cursor is on top of the block start or because the cursor is right
below the block start in columnar mode, a requester warning 'No area
marked' or 'No area selected' appears. Text cut to the clipboard can be
pasted into the same file, other files, other copies of CygnusEd or other
Amiga applications, including the standard console. The selected text is
removed from the file and 'mark' mode is exited and the highlighting
cleared. If in columnar block mode, all of the lines in the block range
are shortened by the number of characters removed. If the block is a
columnar block then an extra IFF chunk is placed in the clipboard to tell
CygnusEd this. This chunk will be ignored by all other applications, so
other programs will paste CygnusEd's columnar blocks as if they were
regular blocks of text.
@EndNode
@Node Copy "Copy - Keyboard shortcut Amiga-c"
Copy - Keyboard shortcut Amiga-c
The 'Copy' command is just like the 'Cut' command except that the
file is not altered.
@EndNode
@Node Paste "Paste - Keyboard shortcut Amiga-v"
Paste - Keyboard shortcut Amiga-v
The 'Paste' command pastes the current contents of the Amiga
clipboard into the current file at the cursor location. Normally the
clipboard will contain text cut or copied out of CygnusEd but it may also
contain blocks of data from other programs. The contents of the clipboard
are unaffected by the paste command.
@EndNode
@Node SetClipboardUnit "Set clipboard unit..."
Set clipboard unit...
The Amiga clipboard actually consists of 256 different clipboards.
Most applications only use clipboard zero, but occasionally having extra
places to store temporary text can be very useful. You can temporarily set
the clipboard unit to a different number, cut or copy some text, to back to
clipboard unit zero, do some more editing, including using the clipboard,
and then switch back to the different clipboard number to retrieve the text
you cut out much earlier, unaffected by intermediate clipboard operations.
The only thing to be careful of is that, since most applications support
clipboard unit zero only, you will not be able to cut and paste to most
other applications with the other clipboards. The main way that people use
this command is to setup three macros that switch to a different clipboard
unit, cut, paste or copy, and then switch back. This lets you select the
appropriate clipboard without having to adjust your settings manually.
CygnusEd allows you to store the clipboard numbers in the macro just by
saying 'yes' when asked when you are defining the macro.
@EndNode
@Node RotMarked "Rot marked"
Rot marked
Occasionally text files on the internet are 'encrypted' using a
method known as 'rot13'. The purpose of this 'encryption' is not to stop
people from reading the text but to stop them from accidentally reading the
text. This allows people to post rot13 rude jokes with a non-encrypted
warning so that people can read the warning and then decide whether or not
to read the encrypted text. The main advantage to the rot13 method is that
if you do it twice, you end up back where you started from - therefore
encrypting text is done the same way as unencrypting it.
The method, for those of you interested, is very simple. Just move
all alphabetic characters forwards thirteen positions, wrapping around from
'Z' back to 'A'. If you do that twice then every character has been moved
forward twenty six positions, putting it back where it started.
The 'Rot marked' command rotates the currently selected text, and
deselects it. Non alphabetic characters are unaffected.
@EndNode
@Node StripCRMarked "Strip CR marked"
Strip CR marked
MS-DOS based machines terminate the lines of their text files with
a carriage return (ascii 13) and a line feed (ascii 10), whereas Amiga text
files are terminated with just a line feed. This command quickly strips
out all of the annoying carriage returns in the selected text, then
deselects the text.
@EndNode
@Node ChangeCaseMarked "Change case marked"
Change case marked
The 'Change case marked' command changes all of the selected
alphabetic characters to upper case if they are lower case and to lower
case if they are upper case.
@EndNode
@Node DeleteWord "Delete word Ctrl+Del"
Delete word Ctrl+Del
The 'Delete word' command deletes the next word in the file and
puts it in a special 'delete word buffer'.
@EndNode
@Node UndeleteWord "Undelete word Ctrl+Alt+Del"
Undelete word Ctrl+Alt+Del
The 'Undelete word' command pastes the last deleted word into the
file at the current cursor position.
@EndNode
@Node BackspaceWord "Bck Spc word Ctrl+BckSpc"
Bck Spc word Ctrl+BckSpc
The 'Backspace word' command deletes the next word in the file and
puts it in a special 'Backspace word buffer'. This is separate from the
'delete word buffer'. Backspace word deletes words to the left of the
cursor instead of the right.
@EndNode
@Node UnbackspaceWord "UnBck Spc word Ctrl+Alt+BckSpc"
UnBck Spc word Ctrl+Alt+BckSpc
The 'Unbackspace word' command pastes the last backspaced word into
the file at the current cursor position.
@EndNode
@Node DeleteLine "Delete line - Keyboard shortcut Amiga-k"
Delete line - Keyboard shortcut Amiga-k
The 'Delete line' command deletes the entire current line and puts
it in a special 'deleted line buffer'.
@EndNode
@Node DeleteToEOL "Delete to EOL - Keyboard shortcut Amiga-y"
Delete to EOL - Keyboard shortcut Amiga-y
The 'Delete to EOL' command deletes the current line from the
cursor position to the end of the line, not including the end of line
character. It shares the 'deleted line buffer' with the 'Delete line'
command.
@EndNode
@Node UndeleteLine "Undelete line - Keyboard shortcut Amiga-l"
Undelete line - Keyboard shortcut Amiga-l
The 'Undelete line' command pastes the contents of the deleted line
buffer (filled either by the 'Delete line' or 'Delete to EOL' commands into
the file at the current cursor position.
@EndNode
@Node RepeatSearchBackwards "Repeat search backwards - Keyboard shortcut Amiga-a"
Repeat search backwards - Keyboard shortcut Amiga-a
The 'Repeat search backwards' command is used to search again for
the last sequence of characters searched for, going backwards. The
keyboard shortcut was chosen so that its position, to the left of the
'repeat search forwards' shortcut would suggest searching to the left, or
backwards. If no search string has been specified yet, the search
requester is brought up.
@EndNode
@Node RepeatSearchForwards "Repeat search forwards - Keyboard shortcut Amiga-s"
Repeat search forwards - Keyboard shortcut Amiga-s
The 'Repeat search forwards' command is used to search again for
the last sequence of characters searched for, going forwards. The keyboard
shortcut was chosen so that its position, to the right of the 'repeat
search backwards' shortcut would suggest searching to the right, or
backwards. It was decided to use the same shortcut as for 'Search for',
except for the lack of the shift key, to suggest the close ties between
these commands. As with the mark/jump to mark commands, the setup command
uses the shift key, the reuse command does not, on the assumption that the
setup command (marking a location or doing an initial search) will be done
less frequently than the reuse command (jump to mark or repeat search). If
no search string has been specified yet, the search requester is brought
@EndNode
@Node SearchFor "Search for... - Keyboard shortcut Amiga-S"
Search for... - Keyboard shortcut Amiga-S
The 'Search for' command is used to start searching for a sequence
of characters. A requester appears with a string gadget for typing in the
characters to be searched for. Additionally there are five toggles for
controlling the search.
Ignore case - when this is checked (the default) then the search is
case insensitive - 'a' is considered equal to 'A'.
Wildcards - when this is checked the '*' character will match any
single character. Obviously this is a fairly weak wild card capability,
but it can be very useful.
Forwards - this controls the direction of the search. By default
it is selected, meaning that the search proceeds forwards through the file.
Unchecking it means that the search goes backwards.
Only whole words - this check box is very useful when searching for
small words, such as 'the', or a variable name such as 'i'. Normally these
sequences of characters would be found inside other words, such as 'then',
'there' and 'whether' or 'while', 'int' and 'main'. When 'only whole
words' is checked, it is only considered a match if the characters before
and after the character sequence are neither alphanumeric nor an
underscore. In other words, it only counts as a match if the sequence of
characters are found as an entire word, rather than the beginning, end or
middle of a word.
Replace mode - toggling this allows you to change from 'search'
mode to 'search and replace' mode without leaving the search requester.
This enables/disables the 'replace' string gadget so that you can enter
text to replace the search string with.
There are two features of the search requester which are frequently
not noticed. The first is that there are menus, which give Amiga-key
access to all of the gadgets, and also allow cutting and pasting from the
Amiga clipboard into the search or replace gadgets. This can make
searching much easier and less error prone, as you frequently don't need to
type in the text to search for. There is also an 'erase' menu command to
clear out the search buffer.
The other hidden feature is the search history. The up and down
arrow keys can be used to look through the last twenty commands searched
for. If you hold down the shift key while using the arrow keys then a
search is done for the next or previous search entry that starts with the
characters to the left of the cursor.
As search can be started either with the Amiga-S, or by hitting
return or enter.
CygnusEd's search routine is written in carefully optimized
assembly language which allows CygnusEd to do a full, case sensitive or
insensitive search with simple wildcards at the rate of 100,000 characters
per second on a 7Mhz 68000. Obviously on faster processors the search
speed is much faster.
Special problems are posed by trying to search for special
characters, such as tabs and end of line characters. One way to search for
these characters is to copy them into the clipboard and then paste them
into the search requester. This is a useful technique, and works even if
you don't know the key sequence for these characters. A sometimes more
convenient option is to be able to type them directly in. With the end of
line character this poses a problem. Typing 'Enter' starts the search -
not what we want in this case. It turns out, however, that the end of line
character is also known as ctrl-J, which means that you can type ctrl-J in
the search requeter wherever you want and end of line character. The TAB
character is usually less problematic - just hit the TAB key, or you can
use ctrl-I. A carriage return character is Ctrl-M. Unfortunately, in most
fonts, these characters show up only as hollow boxes, and it is impossible
to tell which is which. Most people ignore this problem without any
difficulties, but if it annoys you you need to make sure that your string
gadgets use a font which has those characters defined.
There is one additional complication however. Starting with
AmigaDOS 2.0, the ability to type control characters into string gadgets
was restricted, to avoid confusion. By default it doesn't work. So, you
can either go to preferences/icontrol and disable the 'Text Gadget Filter'
or you can hold down the Amiga key when typing these control characters
(Amiga-Ctrl-J - that's a bit tricky to type).
@EndNode
@Node RepeatReplace "Repeat replace - Keyboard shortcut Amiga-r"
Repeat replace - Keyboard shortcut Amiga-r
The 'Repeat replace' command repeats the last replace command, in
the direction that the previous replace went. Note the similar keyboard
shortcuts for these two commands, evoking there similarities, and showing
the same consistent relationship used in the search commands the mark/jump
to mark commands.
@EndNode
@Node Replace "Replace... - Keyboard shortcut Amiga-R"
Replace... - Keyboard shortcut Amiga-R
The 'Replace' command uses the same requester as the 'Search for'
command. In fact, you can change the requester from 'search' mode to
'replace' mode by toggling the 'Replace mode' check box.
After a replace command is started, either by typing Amiga-S,
selecting the 'Search' button or hitting return, CygnusEd searches for the
desired text. If the text is found the title bar for that file changes to
the message:
'(Y)es/(N)o/(L)ast(G)lobal/(T)urbo/(Q)uit?'
Cygnused then waits for you to type one of the capital letters to
state your preference. If you type 'Q', or any unrecognized character then
the replace is cancelled, and CygnusEd returns to normal.
If you type 'Y' then the text under the cursor is replaced and the
search/replace continues after the replaced text.
If you type 'L' then the text under the cursor is replaced and the
search/replace stops.
If you type 'G' then the text is replaced and CygnusEd continues
searching and replacing without prompting you. Once you start this mode
you can stop it at any time by pressing any key. When CygnusEd does a
global replace it still updates the screen, scrolling as needed, so that
you can see exactly what is going on. If this is too slow for your
tastes...
If you type 'T' then CygnusEd does a 'Turbo' replace. This is
similar to the 'Global' replace in that no further promting is done and
that you can cancel the replacing by hitting any key. However the screen
is not updated (except for a running count of the number of replacements
done in the title bar). This alone speeds up the replacing considerably,
but additional internal optimizations are done to ensure that as little
data movement as possible is done. This tends to make the Turbo replace
run dozens to thousands of times faster than global replace. This makes
global operations on multi-megabyte files a matter of just a few seconds.
The other difference with 'Turbo' mode is that, for purposes of
undo, all of the separate replacements are treated as one operation. The
undo command will undo 100,000 replacements at once, whereas with the other
replacement options each replacement is undone separately.
@EndNode
@Node ClipToSearchBuffer "Clip to search buffer"
Clip to search buffer
To avoid the tedious and error prone typing in of search strings
CygnusEd allows you to cut or copy text out or your files and then paste
them into the search buffer. This can either be done with the paste
command in the search/replace requester (see the menus) or with the 'Clip
to search buffer' command. The main reason for having the 'Clip to search
buffer' command is because it can more easily be put into macros and ARexx
scripts.
@EndNode
@Node SetASCIIzeroAlias "Set ASCII zero alias for search..."
Set ASCII zero alias for search...
CygnusEd will allow you to load virtually any file in, anything
from source code to binaries. All of the characters of the file are
displayed and can be deleted, copied, pasted and searched for - except for
the character represented by the ascii value zero. The character '0',
ascii 48, is no problem, but ascii zero is a problem, because this special
value is used to terminate strings in the C language. 'Set ASCII zero
alias for search' allows you to specify a character, which when typed into
the search requester, will be understood to represent ASCII zero. You
should choose some character which you don't frequently need to search for,
because when using this option you won't be able to search for this
character, as it will always get translated to ascii zero when searching
starts.
@EndNode
@Node ChangeCaseLetter "Change case letter - Keyboard shortcut Amiga-g"
Change case letter - Keyboard shortcut Amiga-g
The 'Change case letter' command simply changes the case (upper to
lower, lower to upper) of the character under the cursor if it is an
alphabetic character. Whether it is or not, the cursor is moved to the
next character, allowing you to toggle the case of a large sequence of
characters just by repeating the command.0
@EndNode
@Node ChangeCaseWord "Change case word - Keyboard shortcut Amiga-G"
Change case word - Keyboard shortcut Amiga-G
The 'Change case word' command changes the case of the character
under the cursor and all subsequent characters until it comes to the end of
the current word. See next/prev word for the definition of a word. The
cursor is moved to the end of the word, to allow easy repetition of the
command.
@EndNode
@Node UpperCaseWord "Upper case word"
Upper case word
The 'Upper case word' command upper cases the character under the
cursor and all subsequent characters until it comes to the end of the
current word. See next/prev word for the definition of a word. The cursor
is moved to the end of the word, to allow easy repetition of the command.
@EndNode
@Node LowerCaseWord "Lower case word"
Lower case word
The 'Lower case word' command lower cases the character under the
cursor and all subsequent characters until it comes to the end of the
current word. See next/prev word for the definition of a word. The cursor
is moved to the end of the word, to allow easy repetition of the command.
@EndNode
@Node Undo "Undo"
Undo
Undo - Keyboard shortcut Amiga-u
Redo - Keyboard shortcut Amiga-U
Max undo levels... xxx
Max undo memory... xxxxx
CygnusEd sports a very powerful undo capability, a feature that no
text editor (or other program for that matter) should be without.
CygnusEd's undo is multi-level, allowing you to change your mind easily.
Undo is useful for:
Undoing accidental deletions of important text.
Returning to previous versions of code or text if a new version
doesn't work out.
Reminding you what you were just working on (undo, then redo - the
cursor will go to the last change).
Each time you select 'Undo' you go further into the past. Each
time an additional change that you made to the file is reversed. Each
character typed is a change, each block cut or pasted is a change - copying
a block is not a change. Only operations which actually change the file
buffer count as undoable changes - anything that updates the change counter
in the status bar.
Changes can only be undone in the strict reverse order that they
were done in, and they can only be undone one at a time (although you could
make a macro, or use the repeat command to undo multiple ones in one
operation). These limitations stem from the fact that trying to undo an
operation out of place frequently doesn't make sense - it may mean deleting
text that hasn't been typed in yet, or some other contradictory thing.
When you undo you are moving backwards through time. You can then
decide that you want to move forwards through time again by using the
'Redo' command. This plays back your changes. However, and this is very
important, if you undo several operations and then make a change to the
file, like typing in a single character, then the redo information is
necessarily wiped out. If you try to undo that new operation, planning to
then redo the previous operations, you will find that redoing will simply
redo the typing of that character. In other words, although CygnusEd
supports time travel through undo and redo, CygnusEd does not support
multiple concurrent paths through time - the contradictions and troublesome
philosophical conundrums are just too weird to ponder.
Note that CygnusEd's undo allows you to undo past saves. If you do
this then the change count in the status bar actually goes negative! This
is normal and expected behaviour. The only time that this causes a problem
is if you make some changes to a file and then save it, thus zeroing the
change count. If you then undo one of these changes, the change count goes
to negative one. If you then change the file again, the change count
increments to zero, and CygnusEd thinks that no changes have been made,
when actually two changes have been made since the last save.
The number of levels of undo that CygnusEd supports is limited only
by available memory. Since different people have very different amounts of
memory and very different feelings on the importance of having a thousand
levels of undo, CygnusEd allows you to configure how much memory should be
devoted to the undo buffers, per file loaded. As the names suggest, 'Max
undo levels' specifies that maximum number of undo events that should be
stored per file. Up to 9999 levels are supported, but 100 is a more
typical number. Usually just a dozen or so levels of undo are used, but
occasionally you may find yourself heavily editing a file, only to realize
after an hour or so that you are completely on the wrong track - at times
like that, being able to reverse all your changes can be invaluable. If
you haven't saved then you could use your previous version on disk, or your
backup version (automatically created by CygnusEd if you enable that
option), but if you've saved several times, then undo may be your only
hope.
Since it is the memory consumed by CygnusEd's undo which is your
real concern, CygnusEd allows you to set the maximum amount of memory which
CygnusEd will devoted to undo buffers, per file. The number of undo levels
supported is the smallest of the maximum number of levels specified and the
maximum number that will fit in the maximum amount of memory specified.
Since the size of undo events varies wildly (storing the typing of a single
character in the undo buffer is cheap - storing the pasting in of a 100K
block is expensive) the number of events in the buffer may vary
considerably. Obviously setting both numbers high gives you many levels at
the cost of much memory, and setting the both low gives you few levels at
the cost of little memory. Setting the number of levels high but the
memory low means that the number of undo events stored will be high as long
as the undo events are simple - small blocks or simple typing, and the
amount of memory used will be very consistently around the maximum.
Setting the number of levels low but the memory high means that there will
almost always be the number of levels stored that you requested, and that
the amount of memory will usually be very small, but occasionaly quite big.
Unless you are very short on memory, the defaults, or even larger numbers,
work very well.
@EndNode
@Node JumpToLine "Jump to line... - Keyboard shortcut Amiga-j"
Jump to line... - Keyboard shortcut Amiga-j
As expected the 'Jump to line' command moves the cursor to the
requested line number.
@EndNode
@Node JumpToAutoMark "Jump to auto-mark - Keyboard shortcut Amiga-4"
Jump to auto-mark - Keyboard shortcut Amiga-4
The 'Jump to auto-mark' command is a somewhat unique CygnusEd
feature. It derived from the observation that people quite frequently
briefly jump to a very different location in the file they are editing - to
the beginning or end or to a searched for string - and then want to return.
Clearly the way to do this is to mark their current location before doing
the initial jump, but I usually forget, and I suspect that other people do
to. So CygnusEd attempts to recognize when you are doing this and
automatically set a mark for you. CygnusEd's algorithm for deciding when
to set the auto-mark is simple - if the user moves, by any means, to a
location that is too far away to scroll to, then the auto-mark is set at
the old location. Simple enough. You can then use 'Jump to auto-mark' to
return to your old location. It doesn't always work, because you might,
for instance, jump to the beginning of the file and then search for
something that causes another jump - now the auto-mark points to the
beginning of the file. However it works enough that I hate to use an
editor that doesn't have it.
The only other time that the auto-mark gets set is when you use it.
If you do a 'Jump to auto-mark' then, even if the destination is close
enough to scroll to (it can happen, for subtle reasons), the auto-mark is
set, allowing you to toggle back and forth.
Note that 'close enough to scroll to' is a user settable thing.
See 'Max scroll'.
@EndNode
@Node JumpToByte "Jump to byte... - Keyboard shortcut Amiga-J"
Jump to byte... - Keyboard shortcut Amiga-J
The 'Jump to byte' command moves the cursor to a specific character
or byte location in the file. The bytes in the file are numbered
sequentially starting at zero. Note that the cursor column is not
necessarily related to the byte number because some characters can expand
to fill multiple columns (tab characters) and some characters can take up
no space (escape characters, see 'Esc codes visible?'). This command can
be very useful for stripping the MacBinary header off of a file, as this is
the first 128 bytes. Just do a 'mark', then jump to byte 128, then cut.
@EndNode
@Node CursorKeyMovement "Cursor key movement"
Cursor key movement
Shift+Cursor keys
CygnusEd was carefully designed to make the cursor movement
commands natural and easy to remember. Instead of using Amiga-T to go the
the top of the file, the arrow keys, with their clearly implied directions,
are used with various qualifier keys.
The text in the menus gives a brief description of what the
different the cursor keys do, always in the order up-arrow, down-arrow,
left-arrow, right-arrow.
Holding down the shift key moves the cursor to the edge of the
current page, roughly speaking. Shift plus the up or down arrow keys moves
the cursor to the bottom or bottom of the current screen - as far as it can
move without scrolling. If the cursor is already at the top or bottom then
it scrolls up or down one page. Shift plus the right or left arrow moves
the cursor to the left or right edge of the current line, even if this
means moving beyond the edge of the page.
Holding down the alt key moves cursor twelve character positions,
columns or rows, in the appropriate direction. This is one of my favourite
ways of navigating a file, as it is less harsh and easier to follow than
moving by pages, but not as slow and over delicate as moving a line at a
time.
With the control keys the cursor movements are quite different in
the horizontal versus the vertical direction. Holding down the control key
when typing the up or down arrow keys moves to the beginning and the end of
the file respectively. Holding down the control key when typing the left
or right arrow keys moves the cursor to the previous and next words
respectively.
CygnusEd's word movement algorithm is as follows. It was defined
to make deleting words as useful as possible, by trying to ensure that
CygnusEd doesn't delete too much excess text. If the cursor is on and end
of line character, the cursor is moved one character in the appropriate
direction and the move is over. If the cursor is over an alphanumeric
character, it skips over that character and over any subsequent
alphanumeric characters, and then skips over any tabs or spaces at the end,
if moving forwards. If the cursor starts on a non-alphanumeric character
that isn't a tab or a space then it skips that single character and any
following spaces or tabs, if moving forwards. If the cursor started out on
a tab or a space then it moves over all consecutive tabs and spaces. If
it's moving forwards then it stops then. If moving backwards it continues
on to deal appropriately with any alphanumeric or non-alphanumeric
characters that follow.
The one remaining way of navigating around files in CygnusEd is
with 'turbo mode'. This is a variable speed smooth scroll way of swiftly
getting to where you want to be, while allowing you to slow down at any
time to make sure you know where you are. You can smoothly adjust the
scroll speed from being slow enough to glimpse words in the file, to fast
enough that only the shape of the written areas can be discerned. To start
turbo mode use the alt key together with the up or down arrow keys.
Initially this moves twelve lines at a time, but as soon as the arrow key
starts auto-repeating you're in turbo mode. At this point you can lift off
the alt key to slow yourself down, or press the shift key to speed up. You
can smoothly move between these three speeds (holding down the shift key
only is the same as holding down the alt key only) as you look for the text
you want to find.
@EndNode
@Node MetaMac "MetaMac"
MetaMac
MetaMac is CygnusEd's macro editor. CygnusEd macros are usually
created from within CygnusEd, by simply doing the actions you want turned
into a macro while having CygnusEd record them. However if you make a
mistake while defining a macro, if you want to adjust what a macro does, or
if you just want to see what macros you have defined, MetaMac is the
program for you.
When you first run MetaMac two windows appear. The left window
contains a list of all of the macros that you have defined. The right
window displays the contents of the currently selected macro, if any.
Using the left window is quite easy and intuitive. You can change
which macro is selected by using the arrow keys or the mouse. Macros can
be deleted with the delete key or with the delete macro button. The
project menu work as you would expect. The trickiest part is the 'Add
Macros' menu. The three menu entries here let you find or create the three
basic types of CygnusEd macros - one key invocation macros, multi-key
invocation macros, and a startup macro. If you choose 'Find/Add short
invocation macro' then MetaMac asks you what key you would like to assign
the macro to. If that key is already in use it selects that macro for you.
If it isn't in use, it creates an empty macro assigned to that key. If you
never define actions for that macro key then you have effectively disabled
that key.
Using the right window is somewhat more confusing. First of all
note that the complete CygnusEd menus are attached to this window. Any
keystrokes or menu selections that you make in this window are added to the
currently selected macro, if any. This is necessary in order to allow you
to add any keystrokes and macros to a CygnusEd macro. However it means,
for instance, that you can't use the arrow keys to move through a macro
definition, and you can't use the delete key to delete one line of a macro
entry. Instead these keystrokes will get added to the macro definition.
Moving around this window must be done with the mouse, by selecting a line
or by moving the scroll bar. Deleting lines must be done with the 'Delete
entry' button. The one other operation you can do in the right window is
to double click on an entry that contains some requester data, such as a
numeric value or a filename. This will allow you to edit it in the
appropriate requester. See 'Insert Special' for more details.
@{" New " Link "MetaMacNew"}
@{" Open... - Keyboard shortcut Amiga-o " Link "MetaMacOpen"}
@{" Save - Keyboard shortcut Amiga-w " Link "MetaMacSave"}
@{" Save as... - Keyboard shortcut Amiga-W " Link "MetaMacSaveAs"}
@{" Undo - Keyboard shortcut Amiga-u " Link "MetaMacUndo"}
@{" About... " Link "MetaMacAbout"}
@{" Quit - Keyboard shortcut Amiga-q " Link "Quit"}
@{" Find/Add short invocation macro - Keyboard shortcut Amiga-m " Link "MetaMacFindShort"}
@{" Find/Add long invocation macro - Keyboard shortcut Amiga-M " Link "MetaMacFindLong"}
@{" Find/Add startup macro " Link "MetaMacStartup"}
@{" Delete Macro " Link "MetaMacDeleteMacro"}
@{" Delete Entry " Link "MetaMacDeleteEntry"}
@{" Insert Special " Link "MetaMacInsertSpecial"}
@EndNode
@Node MetaMacNew "New"
New
The 'New' command clears out the currently loaded macro file. If
any changes have made you are asked to confirm before MetaMac proceeds.
@EndNode
@Node MetaMacOpen "Open... - Keyboard shortcut Amiga-o"
Open
The 'Open' command is used to load another macro file into MetaMac.
Since MetaMac can only have one macro file loaded at a time, the currently
loaded macro file is first cleared. If the file has been changed at you
are asked to confirm before MetaMac proceeds.
@EndNode
@Node MetaMacSave "Save - Keyboard shortcut Amiga-w"
Save
The 'Save' command is used to save the macro file that you are
currently working on to the file name associated with it. If there is no
file name associated with it then the standard ASL file requester is
brought up to allow you to select a file name. If you want CygnusEd to
automatically load the macro file in when it is run then you should save
the macro file as s:cedmacros or as cedmacros in the current directory that
you will be running CygnusEd from.
@EndNode
@Node MetaMacSaveAs "Save as... - Keyboard shortcut Amiga-W"
Save as...
The 'Save as' command is used to the macro file that you are
currently working on to a new file. You can save the macros to any file
name but CygnusEd will only automatically load the macro file at startup if
it is saved as s:cedmacros or as cedmacros in the current directory that
you will be running CygnusEd from.
@EndNode
@Node MetaMacUndo "Undo - Keyboard shortcut Amiga-u"
Undo
MetaMac has a very limited undo facility. If you make some changes
to a macro then you can undo those changes if you have not selected another
macro since. All of the changes are undone at once - there is no way to
selectively undo some changes to a macro but not others. If you
accidentally delete a macro this can not be undone, because you necessarily
select another macro and thus clear the undo buffer. If you accidentally
delete a valuable macro, your best course of action would probably be to
reload the macro file without saving the changes.
@EndNode
@Node MetaMacAbout "About..."
About...
The 'About' command merely brings up a box showing the version
number and other fascinating information.
@EndNode
@Node MetaMacQuit "Quit - Keyboard shortcut Amiga-q"
Quit
The 'Quit' command tells MetaMac to exit. If you have made changes
to the currently loaded macro file, MetaMac asks you to confirm before
continuing.
@EndNode
@Node MetaMacDeleteMacro "Delete Macro"
Delete Macro
The 'Delete Macro' button tells MetaMac to delete the currently
selected macro. No warnings are given if the macro has been changed.
@EndNode
@Node MetaMacDeleteEntry "Delete Entry"
Delete Entry
The 'Delete Entry' command is the only way to delete entries from a
macro definition, other than deleting the entire macro. The reason that
the usual options, such as using the 'Del' key or marking a block and
cutting, don't work is because these options are instead recorded into the
macro.
@EndNode
@Node MetaMacInsertSpecial "Insert Special"
Insert Special
The 'Insert Special' command is used to add requester information
to CygnusEd macros. This information is only relevant if it follows a
command which brings up a requester. Examples are commands like 'Open',
'Send DOS/ARexx command', 'Search for', 'Jump to line' and 'Select disk
font...'. These five commands are not the only commands that this applies
to, but they do show off the five different types of requester data that
CygnusEd and MetaMac support within macros. These are:
Filename data - 'Open', 'Save as', any requester that just asks for
a file or directory name.
Text data - 'Send DOS/ARexx command', any requester that just asks
for a single line of text.
Search and replace data - 'Search for', 'Replace', or any other
command that makes the search/replace requester appear.
Numeric data - 'Jump to line', 'Jump to byte', any requester that
asks for a number.
Font data - 'Select disk font...'.
When you select this command a requester appears asking you which
type of data you would like to insert. MetaMac will let you insert any
type of requester data, whether it makes sense or not. If it does not make
sense in the context of the previous command, CygnusEd will silently ignore
When you select the type of data that you would like, a standard
CygnusEd requester of the appropriate type appears. Dismiss the requester
when you have selected the desired values and the data will be entered into
the macro and displayed in the right hand window.
If you wish to edit existing requester values, double click on the
line containing the requester values and the appropriate requester will
appear.
@EndNode
@Node MetaMacFindShort "Find/Add short invocation macro - Keyboard shortcut Amiga-m"
Find/Add short invocation macro - Keyboard shortcut Amiga-m
This command is used to find an existing short invocation macro
(macro that is invoked with just one keystroke) or to create a new one.
When you select this command you are asked to type the keystroke used to
invoke this macro. If that keystroke is in use, then that macro is
selected. Otherwise a new macro is created, attached to that keystroke.
Note that the keyboard shortcut for this is the same as it is in
CygnusEd.
@EndNode
@Node MetaMacFindLong "Find/Add long invocation macro - Keyboard shortcut Amiga-M"
Find/Add long invocation macro - Keyboard shortcut Amiga-M
This command is used to find an existing long invocation macro
(macro that is invoked with a sequence of keystrokes) or to create a new
one. When you select this command you are asked to type the first
keystroke used to invoke this macro. After each keystroke you are asked if
there anymore. If that sequence of keystrokes is in use, then that macro
is selected. Otherwise a new macro is created, attached to that sequence
of keystrokes.
Note that the keyboard shortcut for this is the same as it is in
CygnusEd.
@EndNode
@Node MetaMacStartup "Find/Add startup macro"
Find/Add startup macro
This command is used to find an existing startup macro or to create
a new. If there is already a startup macro it is selected, otherwise an
empty startup macro is created. A macro file can have at most one startup
macro. Having any empty startup macro is functionally the same as having
no startup macro at all.
@EndNode
@Node RecoverCedFiles "RecoverCedFiles"
RecoverCedFiles
Occasionally while working on your Amiga an errant program may
cause your system to crash. If you are working on valuable files when this
happens then this can be quite annoying. With most programs you are just
out of luck. CygnusEd, however, gives you a second chance.
RecoverCedFiles is a program which will scan memory for any files left in
memory by a previous copy of CygnusEd. If RecoverCedFiles is run
immediately after a reboot it will frequently be able to find all of your
files still intact in memory, and allow you to save them!
This is not a guaranteed thing, so don't go rebooting with unsaved
files loaded, counting on RecoverCedFiles to find them. Two things can go
wrong. One is that the magic cookies which RecoverCedFiles uses to locate
files in memory may get destroyed, in which case the files can not even be
located. This can happen because your startup-sequence uses that area of
memory, or because you have a memory board that doesn't continue refreshing
memory while rebooting.
The other thing that can go wrong is even worse. Sometimes the
magic cookies survive, but the file data does not. There is no way that
CygnusEd can distinguish good data from corrupted data. CygnusEd does not
maintain any data integrity checksum for this purpose. Therefore, when
recovering files with RecoverCedFiles is is VITAL that you save the
recovered files to a different file name, and check to see whether the
changes from the previous version are the changes that you typed in, or
random memory errors or overwrites. If you use RecoverCedFiles to save
over top of the previous version of the file then RecoverCedFiles may
unwittingly participate in the destruction of your data.
To increase the change of RecoverCedFiles succeeding, it is
important to run RecoverCedFiles as early on in the rebooting process as
possible. We recommend that you use ctrl-D to abort your startup sequence,
because the loading of commodities and the allocation of disk buffers could
easily overwrite the memory that CygnusEd was using, making recovery
impossible.
@EndNode
@Node ViewsOverview "Views overview"
Views overview
CygnusEd allows you to have multiple cooperating views on a single
file. All of these views are windows into the same data. Changes in one
view are reflected in the others. In fact, if several views are displaying
the same area of a particular file, you can see changes happening in all of
the views simultaneously.
Although the Amiga's wonderful multitasking abilities mean that
there is technically no need for a program to handle multiple files
simultaneously (after all, you can always just run another copy of the
program) it turns out that is frequently very useful to have many files
loaded into a simple program at one time. It simplifies window management,
cutting and pasting, and keeping everything together on one screen.
CygnusEd allows you to load multiple files, and it also allows you to have
multiple views on one file. So, for instance, you can easily be looking at
the opening paragraph of your doctoral thesis in one view while looking at
a supporting paragraph on page 97 in another view. Because the two views
are actually looking at the same document, changes made to one view are
also made to the other one - you never need to worry about them getting out
of sync.
CygnusEd's text output routines are so fast, especially when using
an eight by eight font such as Topaz80, that you can have ten different
views displaying the same lime of text, type as fast as you can, and have
all ten views show the changes, without ever falling behind. And all this
works on a 68000 based Amiga 1000!
You can clearly recognize when you have multiple views on a single
file by the #1, #2, etc. text that appears at the left edge of the status
bar if you are displaying file names in the status bar.
These are the commands for setting view specific settings.
@{" Status line " Link "StatusLine"}
@{" White spaces " Link "WhiteSpaces"}
@{" Scroll bar " Link "ScrollBar"}
@{" Set scroll borders... " Link "SetScrollBorders"}
These are the command for doing view operations, such as creating
and destroying views and moving between views.
@{" View operations " Link "ViewOperations"}
@{" Previous view - Keyboard shortcut Amiga-, " Link "PreviousView"}
@{" Next view - Keyboard shortcut Amiga-. " Link "NextView"}
@{" Split view - Keyboard shortcut Amiga-d " Link "SplitView"}
@{" Expand view - Keyboard shortcut Amiga-] " Link "ExpandView"}
@{" Grow view " Link "GrowView"}
@{" Shrink view " Link "ShrinkView"}
@EndNode
@Node Ed "Ed"
Ed
Ed is a command line or workbench program that is used to invoke
CygnusEd. The advantage of using Ed rather than using CygnusEd directly is
that if CygnusEd is already running, Ed will tell it to load the requested
files. If CygnusEd is not running, Ed will run it and tell it to load the
requested files. That way, you never need to worry about whether or not
CygnusEd is running.
The basic syntax for Ed is that you can specify any number of file
names, with optional wildcards, and you can specify a number of command
line arguments, starting with a dash, to modify the treatment of those
names. For example:
ed #?.c
ed s:user-startup source:ced/main.c
Unless otherwise specified, you can always specify as many files as
desired, and you always specify file specific options after the file you
want them to affect.
-a Activate previously active file
The '-a' command is the only option in this section that does not
apply to a specific file. The '-a' option tells CygnusEd to load in the
specified files, and then move the cursor back to where it was before Ed
was invoked. This is particularly useful if you have a script which will
be loading files into CygnusEd at unpredictable times - this ensures that
the cursor won't be yanked
-f Force loading
The '-f' option is a powerful but dangerous option. It tells
CygnusEd to load the specified file, overwriting the file if it is already
loaded into CygnusEd. This option is dangerous because the previously
loaded file will be lost, even if there were unsaved changes made to it,
without asking the user. '-f' stands for 'force'.
-sticky
There are some applications where an application needs to let the
user edit a file, and then needs to do something with the file when they
have finished editing it. Usually these programs let the user specify what
editor they would like to use, and many people choose CygnusEd for this
purpose. However the default behaviour for Ed, the preferred way to invoke
CygnusEd, is to return immediately, without waiting for the user to finish
editing the file. Normally this behaviour is what is desired - but not in
this case. This is precisely what the '-sticky' option was made for. If
you go 'Ed -sticky filename' then CygnusEd will be run if necessary, the
specified file will be loaded into the new copy of CygnusEd, or an existing
copy if there is one, and Ed will not return until the user finishes
editing the specified file. The user can indicate that they are finished
editing the file either by closing all views on the file (with the Quit
command) or by loading another file on top of the file (with the Open
command). Only one file name can be specified on the command line when
using the '-sticky' command. '-s' is a synonym for '-sticky'. Unlike most
of the file specific options, the -sticky command can go either before the
file name or after. This means that you can define the name of your editor
to be 'ed -sticky' and let the other application tack the file name on at
the end.
-i Ignore
The '-i' command line option tells CygnusEd to load the specified
file in if it isn't already loaded. If the file is already loaded it tells
CygnusEd to move the cursor to the view containing that file. This is
particularly useful for when compiler's need to ensure that a particular
file is loaded so that they can place the cursor on a syntax error. If you
don't specify this option, or '-o' described below, then CygnusEd will warn
you that the file is already loaded and will ask you to confirm before
proceeding. The 'i' stands for 'ignore', as in 'ignore the file on disk if
it's already loaded'.
-o Overwrite
The '-o' command line option tells CygnusEd to load the specified
file in even if is already loaded. If the file is already loaded it tells
CygnusEd to overwrite the previously loaded copy. If any changes have been
made you are asked to confirm before CygnusEd continues. If you don't want
the requester to appear, see the '-i' or '-f' options.
-v View only
The '-v' command tells CygnusEd to load the file to mark it as
non-editable. This setting can be changed after the file is loaded with
the 'Editable file?' menu item under the Environment, File settings menu.
Different options can be combined as long as they don't contradict
each other. If CygnusEd is not yet in memory, the CygnusEd command line
options can be used also. For example:
ed file1 -va
This tells CygnusEd to load in file1, make it non editable and then
reactivate the previously active view.
ed file.c -i ram:err/file.err -fa
This tells CygnusEd to load in file.c, if it isn't already loaded,
then load in ram:err/file.err, overwriting any previously loaded version,
then put the cursor back to the previously active view. This line ensures
that the needed source file is loaded, without losing any changes, and it
ensures that the most recent error file is loaded, overwriting changes if
necessary.
See also: @{" Command line options " Link "CommandLine"}
@EndNode
@Node CommandLine "Command line options"
Command line options
When running CygnusEd there are a number of command line options
that you can specify to alter its behaviour. All of these can also be used
if you are using Ed, the CygnusEd invoker, to run CygnusEd. Some of the
options don't make sense if you are using Ed to pass new file names to an
already running copy of CygnusEd, and are therefore ignored. However we
recommend that you always use Ed to run CygnusEd and to load files into
CygnusEd, because that way you never need to worry about whether CygnusEd
is already running or not.
If you use the command line options below with 'Ed' then they will
only have an effect if CygnusEd has not yet been loaded into memory. If
CygnusEd has already been loaded into memory they will be ignored. These
options can be specified together with file names, except for -r.
If you use CygnusEd on a regular basis you will probably want to
put it into your user-startup script so that CygnusEd is automatically run
for you each time you reboot your Amiga. Normally when you run CygnusEd
its screen immediately opens up, but that is probably not what you want
when running CygnusEd from the user-startup script. The '-r' option tells
CygnusEd to run but to go immediately into dormant mode - 'R'esident mode.
This means that CygnusEd has loaded in and is ready to start editing on a
seconds notice, but has not yet opened its screen. You can make CygnusEd
appear either by typing the Alt-Shift-Return hot-start sequence, or by
using Ed to wake up CygnusEd, and possibly pass in the names of some files
to be loaded. If you specify some file names on the same command line as
the '-r' option then CygnusEd ignores the '-r' option, opens the screen and
displays the files.
-keepio
Normally when you run CygnusEd from a CLI it disconnects itself
completely from the CLI, allowing you to close the CLI at any point.
Normally this is what you want. However it means that if you run any DOS
commands from within CygnusEd, a new CLI window will have to be opened up
to display the output of the commands. If you would prefer that the output
of DOS commands run from CygnusEd go to the CLI that CygnusEd was started
from, specify the '-keepio' option when first running CygnusEd. The
'-keepio' option can be used with the Ed command, but will only have an
effect if CygnusEd has not yet been run - once CygnusEd has detached itself
from the CLI it can never reattach itself. If you use the '-keepio'
command then the CLI that CygnusEd was run from can not be close until
CygnusEd exits completely.
-pubscreen=
CygnusEd can be made to open up on a public screen by using the
environment menu and then saving the environment. However if you want to
be able to specify what public screen CygnusEd should open up on when you
run CygnusEd, you can use the '-pubscreen=' command. The name of the
public screen that you want CygnusEd to use should appear directly after
the equals sign, with no intervening spaces. Case may be significant,
depending on what version of AmigaDOS you are running.
See also: @{" Ed - the CygnusEd invoker " Link "Ed"}
@EndNode
@Node ARexx "ARexx"
ARexx
DOS/ARexx interface
One of the things that makes the Amiga an extremely powerful and
versatile computer is its support of a common scripting language which is
designed to handle communication between multiple programs. CygnusEd has a
powerful ARexx interface which allows it to control other programs, be
controlled by other programs, or it allows you to control it more
precisely, by writing your own complex macros in ARexx and executing them
from within CygnusEd. By executing these ARexx scripts from within macros
that can be attached to any key, you can completely remap CygnusEd's
keyboard. Some people have even gone to the extreme of using ARexx and
CygnusEd to implement small databases or data entry programs.
This portion of the documentation assumes some familiarity with
ARexx programming. Although it is possible to figure out how to write
ARexx programs for CygnusEd just by reading this documentation, and by
looking at the sample ARexx scripts, it is much easier if you get a copy of
one of the excellent ARexx programming manuals.
ARexx is a powerful scripting language that has been almost
universally adopted on the Amiga. It allows different programs to talk to
each other and it allows the end user to add new features to programs that
the original authors never thought of.
CygnusEd was one of the first applications to contain an ARexx
interface. CygnusEd's ARexx interface is very powerful and lets you attach
ARexx scripts and DOS commands to any key on the keyboard. These scripts,
or other scripts, can then control CygnusEd, or other programs.
CygnusEd's ARexx commands are, by and large, the very same commands
which you see in the menus. Exactly the same wording as what you see. For
instance, to clear the current file:
clear
To save the current file under a new name:
save as NewName.txt
As you can see, ARexx programming for CygnusEd needn't be
difficult.
When specifying menu commands from ARexx, case is not important.
Keyboard shortcuts, such as Amiga-a, or Ctrl+Esc, should not be specified.
Neither should the ellipses, which indicate that requesters will appear.
If you wish to send commands to CygnusEd from a script that was run
from CygnusEd then you don't need to worry about the name of CygnusEd's
ARexx message port - your commands will automatically be sent to it.
However, if you want to invoke your scripts from outside of CygnusEd, you
need to be able to tell ARexx whom you want to talk to. The default port
name for CygnusEd is 'rexx_ced'. Note that, unlike most ARexx port names,
CygnusEd's is all lower case. This means that you must be very careful to
enclose it in quotes, or else ARexx will upper case it and communication
will fail. If multiple copies of CygnusEd are run, the additional port
names will be of the form 'rexx_ced1', 'rexx_ced2', etc. Invoke the About
command to see the current port name.
Results are returned from ARexx programs in the Result variable.
However this is only done if you have enabled returning of results with the
'Options results' ARexx command. Additionally, if an error occurred in a
command then the RC variable will be set, and Results will be undefined.
If you wish to add a new command to CygnusEd, by making an ARexx
command that can be executed from within CygnusEd, one way is by using the
'Install DOS/ARexx command' command. To use this command, select it from
the Special, DOS/ARexx Interface menu, choose a command slot number from
one to ten, then enter the name of the ARexx command. The advantage to
this method is that the ARexx command actually gets added to the menus.
Don't forget to save your ARexx command definitions afterwards.
The other way allows you to attach an ARexx script to any key on
the keyboard. Begin by defining a macro attached to the desired key. Then
use the 'Send DOS/ARexx command' command to send the desired command. You
will be asked whether you want the contents of the requester added to the
macro - say yes, and end the macro definition. Don't forget to save your
macros afterwards.
Many of the commands in CygnusEd's menus bring up requesters.
Obviously an ARexx script isn't much use if it can't fill in the values
required by those requesters without bothering the user. CygnusEd's ARexx
interface allows you to respond to these requesters in a simple, orthogonal
way. All file requesters are responded to identically. All yes/no
requesters are responded to identically, and so on. Any time you choose
not to supply data for a requester, the requester will come up. If there
is a situation where a requester may or may not come up it is best to
always supply data for the requester, as it will be ignored if not needed.
Some commands will bring up two requesters, such as the open
command when the current file is changed, is non-zero in length and has no
other views. In this case a yes/no requester will come up asking if it's
okay to proceed and lose changes. If this is answered yes to then a file
requester will appear, asking for the new file name. If you detect this
condition in ARexx you can invoke the Open command like this:
Open 1 'ram:newfile.txt'
Note that if you do this when the above conditions do not apply
then the yes/no requester will not be called and the '1' will be used for
the new file name - generally not what you want.
Yes/no and 'okay' requesters:
The response to these requesters can be given by putting either '1'
or '0' after the command' '1' means yes, '0' means no. Either response is
legal for a single gadget 'okay' requester.
Filename and directory name requesters:
Commands, such as Open, Save as, etc., that require a file name
should simply have the file name, typically enclosed in quotes after the
command name. For instance:
save as 'ram:file.txt'
Numeric requesters:
Numeric requesters, brought up by such commands as 'Enter ascii',
should be supplied with a numeric argument in the legal range for that
particular command. For instance:
Enter ascii 10
String requesters:
String requesters, brought up by such commands as 'Set icon tool
name' should be supplied with the desired string, typically enclosed in
quotes. For instances:
Set icon tool name 'C:ed'
Font requesters:
If you wish to change CygnusEd's font from an ARexx script you can
use the 'Select Disk font' command. Simply follow the command with the
name and size of the desired font. For instance:
select disk font emerald.font 12
Search/replace requesters:
Search data needs to be supplied for the 'Search For' command. The
'Search For' command can be specified with no arguments, in which case the
search requester will appear. It can be specified with just a string to
search for, or it can be specified with a string and five boolean
parameters. The five booleans, which must be specified in order as either
1 or 0, control the four check boxes in the search/replace requester. They
are, in order - case sensitivity, wild cards, forwards/backwards, only
words. For instance:
search for
search for "Hello"
search for "Hello" 1 0 1 1
The first variation brings up the search requester. The second
variation searches for the string Hello, using the current search flags.
Note the quotes to prevent ARexx from upper casing the string. The third
variation searches for Hello after setting the flags to: case
insensitivity on, wild cards off, forwards on and only words on.
The replace command has a similar syntax, with four different
variations:
replace
replace "Hello" "Goodbye"
replace "Hello" "Goodbye" 1 0 1 1
replace "Hello" "Goodbye" 1 0 1 1 1 t
The first variation brings up the replace requester. The second
variation will search for the first instance of "Hello" and replace it with
"Goodbye", using the current search flags. The third variation is the same
as the second except that it specifies the search flags. The fourth
variation specifies 't' for 'turbo' replace. This allows you to do a
global replace in one command. The other option for where the 't' is is
'g' for 'global' replace. Note: When specifying the 't' or 'g' option you
MUST specify a fifth boolean variable and it MUST be 1.
@EndNode